Updated testing with proper indentation
Uses two spaces instead of hard tabs.
This commit is contained in:
@ -68,13 +68,13 @@ snippetFiles
|
|||||||
`const test = require('tape');`,
|
`const test = require('tape');`,
|
||||||
`const ${fileName} = require('./${fileName}.js');`,
|
`const ${fileName} = require('./${fileName}.js');`,
|
||||||
`\ntest('Testing ${fileName}', (t) => {`,
|
`\ntest('Testing ${fileName}', (t) => {`,
|
||||||
`\t//For more information on all the methods supported by tape\n\t//Please go to https://github.com/substack/tape`,
|
` //For more information on all the methods supported by tape\n //Please go to https://github.com/substack/tape`,
|
||||||
`\tt.true(typeof ${fileName} === 'function', '${fileName} is a Function');`,
|
` t.true(typeof ${fileName} === 'function', '${fileName} is a Function');`,
|
||||||
`\t//t.deepEqual(${fileName}(args..), 'Expected');`,
|
` //t.deepEqual(${fileName}(args..), 'Expected');`,
|
||||||
`\t//t.equal(${fileName}(args..), 'Expected');`,
|
` //t.equal(${fileName}(args..), 'Expected');`,
|
||||||
`\t//t.false(${fileName}(args..), 'Expected');`,
|
` //t.false(${fileName}(args..), 'Expected');`,
|
||||||
`\t//t.throws(${fileName}(args..), 'Expected');`,
|
` //t.throws(${fileName}(args..), 'Expected');`,
|
||||||
`\tt.end();`,
|
` t.end();`,
|
||||||
`});`
|
`});`
|
||||||
].join('\n');
|
].join('\n');
|
||||||
|
|
||||||
|
|||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const JSONToDate = require('./JSONToDate.js');
|
const JSONToDate = require('./JSONToDate.js');
|
||||||
|
|
||||||
test('Testing JSONToDate', (t) => {
|
test('Testing JSONToDate', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof JSONToDate === 'function', 'JSONToDate is a Function');
|
t.true(typeof JSONToDate === 'function', 'JSONToDate is a Function');
|
||||||
//t.deepEqual(JSONToDate(args..), 'Expected');
|
//t.deepEqual(JSONToDate(args..), 'Expected');
|
||||||
//t.equal(JSONToDate(args..), 'Expected');
|
//t.equal(JSONToDate(args..), 'Expected');
|
||||||
//t.false(JSONToDate(args..), 'Expected');
|
//t.false(JSONToDate(args..), 'Expected');
|
||||||
//t.throws(JSONToDate(args..), 'Expected');
|
//t.throws(JSONToDate(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const JSONToFile = require('./JSONToFile.js');
|
const JSONToFile = require('./JSONToFile.js');
|
||||||
|
|
||||||
test('Testing JSONToFile', (t) => {
|
test('Testing JSONToFile', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof JSONToFile === 'function', 'JSONToFile is a Function');
|
t.true(typeof JSONToFile === 'function', 'JSONToFile is a Function');
|
||||||
//t.deepEqual(JSONToFile(args..), 'Expected');
|
//t.deepEqual(JSONToFile(args..), 'Expected');
|
||||||
//t.equal(JSONToFile(args..), 'Expected');
|
//t.equal(JSONToFile(args..), 'Expected');
|
||||||
//t.false(JSONToFile(args..), 'Expected');
|
//t.false(JSONToFile(args..), 'Expected');
|
||||||
//t.throws(JSONToFile(args..), 'Expected');
|
//t.throws(JSONToFile(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const README = require('./README.js');
|
const README = require('./README.js');
|
||||||
|
|
||||||
test('Testing README', (t) => {
|
test('Testing README', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof README === 'function', 'README is a Function');
|
t.true(typeof README === 'function', 'README is a Function');
|
||||||
//t.deepEqual(README(args..), 'Expected');
|
//t.deepEqual(README(args..), 'Expected');
|
||||||
//t.equal(README(args..), 'Expected');
|
//t.equal(README(args..), 'Expected');
|
||||||
//t.false(README(args..), 'Expected');
|
//t.false(README(args..), 'Expected');
|
||||||
//t.throws(README(args..), 'Expected');
|
//t.throws(README(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const RGBToHex = require('./RGBToHex.js');
|
const RGBToHex = require('./RGBToHex.js');
|
||||||
|
|
||||||
test('Testing RGBToHex', (t) => {
|
test('Testing RGBToHex', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof RGBToHex === 'function', 'RGBToHex is a Function');
|
t.true(typeof RGBToHex === 'function', 'RGBToHex is a Function');
|
||||||
t.equal(RGBToHex(255, 165, 1), 'ffa501', "Converts the values of RGB components to a color code.");
|
t.equal(RGBToHex(255, 165, 1), 'ffa501', "Converts the values of RGB components to a color code.");
|
||||||
//t.deepEqual(RGBToHex(args..), 'Expected');
|
//t.deepEqual(RGBToHex(args..), 'Expected');
|
||||||
//t.equal(RGBToHex(args..), 'Expected');
|
//t.equal(RGBToHex(args..), 'Expected');
|
||||||
//t.false(RGBToHex(args..), 'Expected');
|
//t.false(RGBToHex(args..), 'Expected');
|
||||||
//t.throws(RGBToHex(args..), 'Expected');
|
//t.throws(RGBToHex(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const URLJoin = require('./URLJoin.js');
|
const URLJoin = require('./URLJoin.js');
|
||||||
|
|
||||||
test('Testing URLJoin', (t) => {
|
test('Testing URLJoin', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof URLJoin === 'function', 'URLJoin is a Function');
|
t.true(typeof URLJoin === 'function', 'URLJoin is a Function');
|
||||||
t.equal(URLJoin('http://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo'), 'http://www.google.com/a/b/cd?foo=123&bar=foo', 'Returns proper URL');
|
t.equal(URLJoin('http://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo'), 'http://www.google.com/a/b/cd?foo=123&bar=foo', 'Returns proper URL');
|
||||||
t.equal(URLJoin('file://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo'), 'file:///www.google.com/a/b/cd?foo=123&bar=foo', 'Returns proper URL');
|
t.equal(URLJoin('file://www.google.com', 'a', '/b/cd', '?foo=123', '?bar=foo'), 'file:///www.google.com/a/b/cd?foo=123&bar=foo', 'Returns proper URL');
|
||||||
//t.deepEqual(URLJoin(args..), 'Expected');
|
//t.deepEqual(URLJoin(args..), 'Expected');
|
||||||
//t.equal(URLJoin(args..), 'Expected');
|
//t.equal(URLJoin(args..), 'Expected');
|
||||||
//t.false(URLJoin(args..), 'Expected');
|
//t.false(URLJoin(args..), 'Expected');
|
||||||
//t.throws(URLJoin(args..), 'Expected');
|
//t.throws(URLJoin(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const UUIDGeneratorBrowser = require('./UUIDGeneratorBrowser.js');
|
const UUIDGeneratorBrowser = require('./UUIDGeneratorBrowser.js');
|
||||||
|
|
||||||
test('Testing UUIDGeneratorBrowser', (t) => {
|
test('Testing UUIDGeneratorBrowser', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof UUIDGeneratorBrowser === 'function', 'UUIDGeneratorBrowser is a Function');
|
t.true(typeof UUIDGeneratorBrowser === 'function', 'UUIDGeneratorBrowser is a Function');
|
||||||
//t.deepEqual(UUIDGeneratorBrowser(args..), 'Expected');
|
//t.deepEqual(UUIDGeneratorBrowser(args..), 'Expected');
|
||||||
//t.equal(UUIDGeneratorBrowser(args..), 'Expected');
|
//t.equal(UUIDGeneratorBrowser(args..), 'Expected');
|
||||||
//t.false(UUIDGeneratorBrowser(args..), 'Expected');
|
//t.false(UUIDGeneratorBrowser(args..), 'Expected');
|
||||||
//t.throws(UUIDGeneratorBrowser(args..), 'Expected');
|
//t.throws(UUIDGeneratorBrowser(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const UUIDGeneratorNode = require('./UUIDGeneratorNode.js');
|
const UUIDGeneratorNode = require('./UUIDGeneratorNode.js');
|
||||||
|
|
||||||
test('Testing UUIDGeneratorNode', (t) => {
|
test('Testing UUIDGeneratorNode', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof UUIDGeneratorNode === 'function', 'UUIDGeneratorNode is a Function');
|
t.true(typeof UUIDGeneratorNode === 'function', 'UUIDGeneratorNode is a Function');
|
||||||
//t.deepEqual(UUIDGeneratorNode(args..), 'Expected');
|
//t.deepEqual(UUIDGeneratorNode(args..), 'Expected');
|
||||||
//t.equal(UUIDGeneratorNode(args..), 'Expected');
|
//t.equal(UUIDGeneratorNode(args..), 'Expected');
|
||||||
//t.false(UUIDGeneratorNode(args..), 'Expected');
|
//t.false(UUIDGeneratorNode(args..), 'Expected');
|
||||||
//t.throws(UUIDGeneratorNode(args..), 'Expected');
|
//t.throws(UUIDGeneratorNode(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const anagrams = require('./anagrams.js');
|
const anagrams = require('./anagrams.js');
|
||||||
|
|
||||||
test('Testing anagrams', (t) => {
|
test('Testing anagrams', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof anagrams === 'function', 'anagrams is a Function');
|
t.true(typeof anagrams === 'function', 'anagrams is a Function');
|
||||||
t.deepEqual(anagrams('abc'), ['abc','acb','bac','bca','cab','cba'], "Generates all anagrams of a string");
|
t.deepEqual(anagrams('abc'), ['abc','acb','bac','bca','cab','cba'], "Generates all anagrams of a string");
|
||||||
//t.deepEqual(anagrams(args..), 'Expected');
|
//t.deepEqual(anagrams(args..), 'Expected');
|
||||||
//t.equal(anagrams(args..), 'Expected');
|
//t.equal(anagrams(args..), 'Expected');
|
||||||
//t.false(anagrams(args..), 'Expected');
|
//t.false(anagrams(args..), 'Expected');
|
||||||
//t.throws(anagrams(args..), 'Expected');
|
//t.throws(anagrams(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const arrayToHtmlList = require('./arrayToHtmlList.js');
|
const arrayToHtmlList = require('./arrayToHtmlList.js');
|
||||||
|
|
||||||
test('Testing arrayToHtmlList', (t) => {
|
test('Testing arrayToHtmlList', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof arrayToHtmlList === 'function', 'arrayToHtmlList is a Function');
|
t.true(typeof arrayToHtmlList === 'function', 'arrayToHtmlList is a Function');
|
||||||
//t.deepEqual(arrayToHtmlList(args..), 'Expected');
|
//t.deepEqual(arrayToHtmlList(args..), 'Expected');
|
||||||
//t.equal(arrayToHtmlList(args..), 'Expected');
|
//t.equal(arrayToHtmlList(args..), 'Expected');
|
||||||
//t.false(arrayToHtmlList(args..), 'Expected');
|
//t.false(arrayToHtmlList(args..), 'Expected');
|
||||||
//t.throws(arrayToHtmlList(args..), 'Expected');
|
//t.throws(arrayToHtmlList(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const ary = require('./ary.js');
|
const ary = require('./ary.js');
|
||||||
|
|
||||||
test('Testing ary', (t) => {
|
test('Testing ary', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof ary === 'function', 'ary is a Function');
|
t.true(typeof ary === 'function', 'ary is a Function');
|
||||||
//t.deepEqual(ary(args..), 'Expected');
|
//t.deepEqual(ary(args..), 'Expected');
|
||||||
//t.equal(ary(args..), 'Expected');
|
//t.equal(ary(args..), 'Expected');
|
||||||
//t.false(ary(args..), 'Expected');
|
//t.false(ary(args..), 'Expected');
|
||||||
//t.throws(ary(args..), 'Expected');
|
//t.throws(ary(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const atob = require('./atob.js');
|
const atob = require('./atob.js');
|
||||||
|
|
||||||
test('Testing atob', (t) => {
|
test('Testing atob', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof atob === 'function', 'atob is a Function');
|
t.true(typeof atob === 'function', 'atob is a Function');
|
||||||
t.equals(atob('Zm9vYmFy'), 'foobar', 'atob("Zm9vYmFy") equals "foobar"');
|
t.equals(atob('Zm9vYmFy'), 'foobar', 'atob("Zm9vYmFy") equals "foobar"');
|
||||||
t.equals(atob('Z'), '', 'atob("Z") returns ""');
|
t.equals(atob('Z'), '', 'atob("Z") returns ""');
|
||||||
//t.deepEqual(atob(args..), 'Expected');
|
//t.deepEqual(atob(args..), 'Expected');
|
||||||
//t.equal(atob(args..), 'Expected');
|
//t.equal(atob(args..), 'Expected');
|
||||||
//t.false(atob(args..), 'Expected');
|
//t.false(atob(args..), 'Expected');
|
||||||
//t.throws(atob(args..), 'Expected');
|
//t.throws(atob(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,23 +2,23 @@ const test = require('tape');
|
|||||||
const average = require('./average.js');
|
const average = require('./average.js');
|
||||||
|
|
||||||
test('Testing average', (t) => {
|
test('Testing average', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof average === 'function', 'average is a Function');
|
t.true(typeof average === 'function', 'average is a Function');
|
||||||
t.true(average(true) === 1, 'average(true) returns 0');
|
t.true(average(true) === 1, 'average(true) returns 0');
|
||||||
t.true(average(false) === 0, 'average(false) returns 1');
|
t.true(average(false) === 0, 'average(false) returns 1');
|
||||||
t.equal(average(9, 1), 5, 'average(9, 1) returns 5');
|
t.equal(average(9, 1), 5, 'average(9, 1) returns 5');
|
||||||
t.equal(average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631), 32163.909090909092, 'average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 ');
|
t.equal(average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631), 32163.909090909092, 'average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 ');
|
||||||
t.equal(average(1, 2, 3), 2, 'average(1, 2, 3) returns 2');
|
t.equal(average(1, 2, 3), 2, 'average(1, 2, 3) returns 2');
|
||||||
t.equal(average(null), 0, 'average(null) returns 0');
|
t.equal(average(null), 0, 'average(null) returns 0');
|
||||||
t.true(isNaN(average(undefined)), 'average(1, 2, 3) returns NaN');
|
t.true(isNaN(average(undefined)), 'average(1, 2, 3) returns NaN');
|
||||||
t.true(isNaN(average('String')), 'average(String) returns NaN');
|
t.true(isNaN(average('String')), 'average(String) returns NaN');
|
||||||
t.true(isNaN(average({ a: 123})), 'average({ a: 123}) returns NaN');
|
t.true(isNaN(average({ a: 123})), 'average({ a: 123}) returns NaN');
|
||||||
t.true(isNaN(average([undefined, 0, 'string'])), 'average([undefined, 0, string]) returns NaN');
|
t.true(isNaN(average([undefined, 0, 'string'])), 'average([undefined, 0, string]) returns NaN');
|
||||||
|
|
||||||
let start = new Date().getTime();
|
let start = new Date().getTime();
|
||||||
average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631);
|
average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631);
|
||||||
let end = new Date().getTime();
|
let end = new Date().getTime();
|
||||||
t.true((end - start) < 2000, 'head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run');
|
t.true((end - start) < 2000, 'head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const averageBy = require('./averageBy.js');
|
const averageBy = require('./averageBy.js');
|
||||||
|
|
||||||
test('Testing averageBy', (t) => {
|
test('Testing averageBy', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof averageBy === 'function', 'averageBy is a Function');
|
t.true(typeof averageBy === 'function', 'averageBy is a Function');
|
||||||
t.equals(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n), 5, 'Produces the right result with a function');
|
t.equals(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], o => o.n), 5, 'Produces the right result with a function');
|
||||||
t.equals(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n'), 5, 'Produces the right result with a property name');
|
t.equals(averageBy([{ n: 4 }, { n: 2 }, { n: 8 }, { n: 6 }], 'n'), 5, 'Produces the right result with a property name');
|
||||||
//t.deepEqual(averageBy(args..), 'Expected');
|
//t.deepEqual(averageBy(args..), 'Expected');
|
||||||
//t.equal(averageBy(args..), 'Expected');
|
//t.equal(averageBy(args..), 'Expected');
|
||||||
//t.false(averageBy(args..), 'Expected');
|
//t.false(averageBy(args..), 'Expected');
|
||||||
//t.throws(averageBy(args..), 'Expected');
|
//t.throws(averageBy(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const binarySearch = require('./binarySearch.js');
|
const binarySearch = require('./binarySearch.js');
|
||||||
|
|
||||||
test('Testing binarySearch', (t) => {
|
test('Testing binarySearch', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof binarySearch === 'function', 'binarySearch is a Function');
|
t.true(typeof binarySearch === 'function', 'binarySearch is a Function');
|
||||||
//t.deepEqual(binarySearch(args..), 'Expected');
|
//t.deepEqual(binarySearch(args..), 'Expected');
|
||||||
//t.equal(binarySearch(args..), 'Expected');
|
//t.equal(binarySearch(args..), 'Expected');
|
||||||
//t.false(binarySearch(args..), 'Expected');
|
//t.false(binarySearch(args..), 'Expected');
|
||||||
//t.throws(binarySearch(args..), 'Expected');
|
//t.throws(binarySearch(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const bind = require('./bind.js');
|
const bind = require('./bind.js');
|
||||||
|
|
||||||
test('Testing bind', (t) => {
|
test('Testing bind', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof bind === 'function', 'bind is a Function');
|
t.true(typeof bind === 'function', 'bind is a Function');
|
||||||
//t.deepEqual(bind(args..), 'Expected');
|
//t.deepEqual(bind(args..), 'Expected');
|
||||||
//t.equal(bind(args..), 'Expected');
|
//t.equal(bind(args..), 'Expected');
|
||||||
//t.false(bind(args..), 'Expected');
|
//t.false(bind(args..), 'Expected');
|
||||||
//t.throws(bind(args..), 'Expected');
|
//t.throws(bind(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const bindKey = require('./bindKey.js');
|
const bindKey = require('./bindKey.js');
|
||||||
|
|
||||||
test('Testing bindKey', (t) => {
|
test('Testing bindKey', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof bindKey === 'function', 'bindKey is a Function');
|
t.true(typeof bindKey === 'function', 'bindKey is a Function');
|
||||||
//t.deepEqual(bindKey(args..), 'Expected');
|
//t.deepEqual(bindKey(args..), 'Expected');
|
||||||
//t.equal(bindKey(args..), 'Expected');
|
//t.equal(bindKey(args..), 'Expected');
|
||||||
//t.false(bindKey(args..), 'Expected');
|
//t.false(bindKey(args..), 'Expected');
|
||||||
//t.throws(bindKey(args..), 'Expected');
|
//t.throws(bindKey(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const bottomVisible = require('./bottomVisible.js');
|
const bottomVisible = require('./bottomVisible.js');
|
||||||
|
|
||||||
test('Testing bottomVisible', (t) => {
|
test('Testing bottomVisible', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof bottomVisible === 'function', 'bottomVisible is a Function');
|
t.true(typeof bottomVisible === 'function', 'bottomVisible is a Function');
|
||||||
//t.deepEqual(bottomVisible(args..), 'Expected');
|
//t.deepEqual(bottomVisible(args..), 'Expected');
|
||||||
//t.equal(bottomVisible(args..), 'Expected');
|
//t.equal(bottomVisible(args..), 'Expected');
|
||||||
//t.false(bottomVisible(args..), 'Expected');
|
//t.false(bottomVisible(args..), 'Expected');
|
||||||
//t.throws(bottomVisible(args..), 'Expected');
|
//t.throws(bottomVisible(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const btoa = require('./btoa.js');
|
const btoa = require('./btoa.js');
|
||||||
|
|
||||||
test('Testing btoa', (t) => {
|
test('Testing btoa', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof btoa === 'function', 'btoa is a Function');
|
t.true(typeof btoa === 'function', 'btoa is a Function');
|
||||||
t.equals(btoa('foobar'), 'Zm9vYmFy', 'btoa("foobar") equals "Zm9vYmFy"');
|
t.equals(btoa('foobar'), 'Zm9vYmFy', 'btoa("foobar") equals "Zm9vYmFy"');
|
||||||
//t.deepEqual(btoa(args..), 'Expected');
|
//t.deepEqual(btoa(args..), 'Expected');
|
||||||
//t.equal(btoa(args..), 'Expected');
|
//t.equal(btoa(args..), 'Expected');
|
||||||
//t.false(btoa(args..), 'Expected');
|
//t.false(btoa(args..), 'Expected');
|
||||||
//t.throws(btoa(args..), 'Expected');
|
//t.throws(btoa(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const byteSize = require('./byteSize.js');
|
const byteSize = require('./byteSize.js');
|
||||||
|
|
||||||
test('Testing byteSize', (t) => {
|
test('Testing byteSize', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof byteSize === 'function', 'byteSize is a Function');
|
t.true(typeof byteSize === 'function', 'byteSize is a Function');
|
||||||
// Works only in browser
|
// Works only in browser
|
||||||
// t.equal(byteSize('Hello World'), 11, "Returns the length of a string in bytes");
|
// t.equal(byteSize('Hello World'), 11, "Returns the length of a string in bytes");
|
||||||
//t.deepEqual(byteSize(args..), 'Expected');
|
//t.deepEqual(byteSize(args..), 'Expected');
|
||||||
//t.equal(byteSize(args..), 'Expected');
|
//t.equal(byteSize(args..), 'Expected');
|
||||||
//t.false(byteSize(args..), 'Expected');
|
//t.false(byteSize(args..), 'Expected');
|
||||||
//t.throws(byteSize(args..), 'Expected');
|
//t.throws(byteSize(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const call = require('./call.js');
|
const call = require('./call.js');
|
||||||
|
|
||||||
test('Testing call', (t) => {
|
test('Testing call', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof call === 'function', 'call is a Function');
|
t.true(typeof call === 'function', 'call is a Function');
|
||||||
//t.deepEqual(call(args..), 'Expected');
|
//t.deepEqual(call(args..), 'Expected');
|
||||||
//t.equal(call(args..), 'Expected');
|
//t.equal(call(args..), 'Expected');
|
||||||
//t.false(call(args..), 'Expected');
|
//t.false(call(args..), 'Expected');
|
||||||
//t.throws(call(args..), 'Expected');
|
//t.throws(call(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const capitalize = require('./capitalize.js');
|
const capitalize = require('./capitalize.js');
|
||||||
|
|
||||||
test('Testing capitalize', (t) => {
|
test('Testing capitalize', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof capitalize === 'function', 'capitalize is a Function');
|
t.true(typeof capitalize === 'function', 'capitalize is a Function');
|
||||||
t.equal(capitalize('fooBar'), 'FooBar', "Capitalizes the first letter of a string");
|
t.equal(capitalize('fooBar'), 'FooBar', "Capitalizes the first letter of a string");
|
||||||
t.equal(capitalize('fooBar', true), 'Foobar', "Capitalizes the first letter of a string");
|
t.equal(capitalize('fooBar', true), 'Foobar', "Capitalizes the first letter of a string");
|
||||||
//t.deepEqual(capitalize(args..), 'Expected');
|
//t.deepEqual(capitalize(args..), 'Expected');
|
||||||
//t.equal(capitalize(args..), 'Expected');
|
//t.equal(capitalize(args..), 'Expected');
|
||||||
//t.false(capitalize(args..), 'Expected');
|
//t.false(capitalize(args..), 'Expected');
|
||||||
//t.throws(capitalize(args..), 'Expected');
|
//t.throws(capitalize(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const capitalizeEveryWord = require('./capitalizeEveryWord.js');
|
const capitalizeEveryWord = require('./capitalizeEveryWord.js');
|
||||||
|
|
||||||
test('Testing capitalizeEveryWord', (t) => {
|
test('Testing capitalizeEveryWord', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof capitalizeEveryWord === 'function', 'capitalizeEveryWord is a Function');
|
t.true(typeof capitalizeEveryWord === 'function', 'capitalizeEveryWord is a Function');
|
||||||
t.equal(capitalizeEveryWord('hello world!'), 'Hello World!', "Capitalizes the first letter of every word in a string");
|
t.equal(capitalizeEveryWord('hello world!'), 'Hello World!', "Capitalizes the first letter of every word in a string");
|
||||||
//t.deepEqual(capitalizeEveryWord(args..), 'Expected');
|
//t.deepEqual(capitalizeEveryWord(args..), 'Expected');
|
||||||
//t.equal(capitalizeEveryWord(args..), 'Expected');
|
//t.equal(capitalizeEveryWord(args..), 'Expected');
|
||||||
//t.false(capitalizeEveryWord(args..), 'Expected');
|
//t.false(capitalizeEveryWord(args..), 'Expected');
|
||||||
//t.throws(capitalizeEveryWord(args..), 'Expected');
|
//t.throws(capitalizeEveryWord(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,17 +2,17 @@ const test = require('tape');
|
|||||||
const castArray = require('./castArray.js');
|
const castArray = require('./castArray.js');
|
||||||
|
|
||||||
test('Testing castArray', (t) => {
|
test('Testing castArray', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof castArray === 'function', 'castArray is a Function');
|
t.true(typeof castArray === 'function', 'castArray is a Function');
|
||||||
t.deepEqual(castArray(1), [1], 'Works for single values');
|
t.deepEqual(castArray(1), [1], 'Works for single values');
|
||||||
t.deepEqual(castArray([1]), [1], 'Works for arrays with one value');
|
t.deepEqual(castArray([1]), [1], 'Works for arrays with one value');
|
||||||
t.deepEqual(castArray([1,2,3]), [1,2,3], 'Works for arrays with multiple value');
|
t.deepEqual(castArray([1,2,3]), [1,2,3], 'Works for arrays with multiple value');
|
||||||
t.deepEqual(castArray('test'), ['test'], 'Works for strings');
|
t.deepEqual(castArray('test'), ['test'], 'Works for strings');
|
||||||
t.deepEqual(castArray({}), [{}], 'Works for objects');
|
t.deepEqual(castArray({}), [{}], 'Works for objects');
|
||||||
//t.deepEqual(castArray(args..), 'Expected');
|
//t.deepEqual(castArray(args..), 'Expected');
|
||||||
//t.equal(castArray(args..), 'Expected');
|
//t.equal(castArray(args..), 'Expected');
|
||||||
//t.false(castArray(args..), 'Expected');
|
//t.false(castArray(args..), 'Expected');
|
||||||
//t.throws(castArray(args..), 'Expected');
|
//t.throws(castArray(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const chainAsync = require('./chainAsync.js');
|
const chainAsync = require('./chainAsync.js');
|
||||||
|
|
||||||
test('Testing chainAsync', (t) => {
|
test('Testing chainAsync', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof chainAsync === 'function', 'chainAsync is a Function');
|
t.true(typeof chainAsync === 'function', 'chainAsync is a Function');
|
||||||
//t.deepEqual(chainAsync(args..), 'Expected');
|
//t.deepEqual(chainAsync(args..), 'Expected');
|
||||||
//t.equal(chainAsync(args..), 'Expected');
|
//t.equal(chainAsync(args..), 'Expected');
|
||||||
//t.false(chainAsync(args..), 'Expected');
|
//t.false(chainAsync(args..), 'Expected');
|
||||||
//t.throws(chainAsync(args..), 'Expected');
|
//t.throws(chainAsync(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,11 +2,11 @@ const test = require('tape');
|
|||||||
const chunk = require('./chunk.js');
|
const chunk = require('./chunk.js');
|
||||||
|
|
||||||
test('Testing chunk', (t) => {
|
test('Testing chunk', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof chunk === 'function', 'chunk is a Function');
|
t.true(typeof chunk === 'function', 'chunk is a Function');
|
||||||
t.deepEqual(chunk([1, 2, 3, 4, 5], 2), [[1,2],[3,4],[5]], "chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] ");
|
t.deepEqual(chunk([1, 2, 3, 4, 5], 2), [[1,2],[3,4],[5]], "chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] ");
|
||||||
t.deepEqual(chunk([]), [], 'chunk([]) returns []');
|
t.deepEqual(chunk([]), [], 'chunk([]) returns []');
|
||||||
t.deepEqual(chunk(123), [], 'chunk(123) returns []');
|
t.deepEqual(chunk(123), [], 'chunk(123) returns []');
|
||||||
t.deepEqual(chunk({ a: 123}), [], 'chunk({ a: 123}) returns []');
|
t.deepEqual(chunk({ a: 123}), [], 'chunk({ a: 123}) returns []');
|
||||||
t.deepEqual(chunk('string', 2), [ 'st', 'ri', 'ng' ], 'chunk(string, 2) returns [ st, ri, ng ]');
|
t.deepEqual(chunk('string', 2), [ 'st', 'ri', 'ng' ], 'chunk(string, 2) returns [ st, ri, ng ]');
|
||||||
|
|||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const clampNumber = require('./clampNumber.js');
|
const clampNumber = require('./clampNumber.js');
|
||||||
|
|
||||||
test('Testing clampNumber', (t) => {
|
test('Testing clampNumber', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof clampNumber === 'function', 'clampNumber is a Function');
|
t.true(typeof clampNumber === 'function', 'clampNumber is a Function');
|
||||||
t.equal(clampNumber(2, 3, 5), 3, "Clamps num within the inclusive range specified by the boundary values a and b");
|
t.equal(clampNumber(2, 3, 5), 3, "Clamps num within the inclusive range specified by the boundary values a and b");
|
||||||
//t.deepEqual(clampNumber(args..), 'Expected');
|
//t.deepEqual(clampNumber(args..), 'Expected');
|
||||||
//t.equal(clampNumber(args..), 'Expected');
|
//t.equal(clampNumber(args..), 'Expected');
|
||||||
//t.false(clampNumber(args..), 'Expected');
|
//t.false(clampNumber(args..), 'Expected');
|
||||||
//t.throws(clampNumber(args..), 'Expected');
|
//t.throws(clampNumber(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const cleanObj = require('./cleanObj.js');
|
const cleanObj = require('./cleanObj.js');
|
||||||
|
|
||||||
test('Testing cleanObj', (t) => {
|
test('Testing cleanObj', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof cleanObj === 'function', 'cleanObj is a Function');
|
t.true(typeof cleanObj === 'function', 'cleanObj is a Function');
|
||||||
const testObj = { a: 1, b: 2, children: { a: 1, b: 2 } };
|
const testObj = { a: 1, b: 2, children: { a: 1, b: 2 } };
|
||||||
t.deepEqual(cleanObj(testObj, ['a'], 'children'), { a: 1, children : { a: 1}}, "Removes any properties except the ones specified from a JSON object");
|
t.deepEqual(cleanObj(testObj, ['a'], 'children'), { a: 1, children : { a: 1}}, "Removes any properties except the ones specified from a JSON object");
|
||||||
//t.deepEqual(cleanObj(args..), 'Expected');
|
//t.deepEqual(cleanObj(args..), 'Expected');
|
||||||
//t.equal(cleanObj(args..), 'Expected');
|
//t.equal(cleanObj(args..), 'Expected');
|
||||||
//t.false(cleanObj(args..), 'Expected');
|
//t.false(cleanObj(args..), 'Expected');
|
||||||
//t.throws(cleanObj(args..), 'Expected');
|
//t.throws(cleanObj(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const cloneRegExp = require('./cloneRegExp.js');
|
const cloneRegExp = require('./cloneRegExp.js');
|
||||||
|
|
||||||
test('Testing cloneRegExp', (t) => {
|
test('Testing cloneRegExp', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof cloneRegExp === 'function', 'cloneRegExp is a Function');
|
t.true(typeof cloneRegExp === 'function', 'cloneRegExp is a Function');
|
||||||
const rgTest = /./g;
|
const rgTest = /./g;
|
||||||
t.notEqual(cloneRegExp(rgTest), rgTest, 'Clones regular expressions properly');
|
t.notEqual(cloneRegExp(rgTest), rgTest, 'Clones regular expressions properly');
|
||||||
//t.deepEqual(cloneRegExp(args..), 'Expected');
|
//t.deepEqual(cloneRegExp(args..), 'Expected');
|
||||||
//t.equal(cloneRegExp(args..), 'Expected');
|
//t.equal(cloneRegExp(args..), 'Expected');
|
||||||
//t.false(cloneRegExp(args..), 'Expected');
|
//t.false(cloneRegExp(args..), 'Expected');
|
||||||
//t.throws(cloneRegExp(args..), 'Expected');
|
//t.throws(cloneRegExp(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const coalesce = require('./coalesce.js');
|
const coalesce = require('./coalesce.js');
|
||||||
|
|
||||||
test('Testing coalesce', (t) => {
|
test('Testing coalesce', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof coalesce === 'function', 'coalesce is a Function');
|
t.true(typeof coalesce === 'function', 'coalesce is a Function');
|
||||||
t.deepEqual(coalesce(null, undefined, '', NaN, 'Waldo'), '', "Returns the first non-null/undefined argument");
|
t.deepEqual(coalesce(null, undefined, '', NaN, 'Waldo'), '', "Returns the first non-null/undefined argument");
|
||||||
//t.deepEqual(coalesce(args..), 'Expected');
|
//t.deepEqual(coalesce(args..), 'Expected');
|
||||||
//t.equal(coalesce(args..), 'Expected');
|
//t.equal(coalesce(args..), 'Expected');
|
||||||
//t.false(coalesce(args..), 'Expected');
|
//t.false(coalesce(args..), 'Expected');
|
||||||
//t.throws(coalesce(args..), 'Expected');
|
//t.throws(coalesce(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const coalesceFactory = require('./coalesceFactory.js');
|
const coalesceFactory = require('./coalesceFactory.js');
|
||||||
|
|
||||||
test('Testing coalesceFactory', (t) => {
|
test('Testing coalesceFactory', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof coalesceFactory === 'function', 'coalesceFactory is a Function');
|
t.true(typeof coalesceFactory === 'function', 'coalesceFactory is a Function');
|
||||||
const customCoalesce = coalesceFactory(_ => ![null, undefined, '', NaN].includes(_));
|
const customCoalesce = coalesceFactory(_ => ![null, undefined, '', NaN].includes(_));
|
||||||
t.deepEqual(customCoalesce(undefined, null, NaN, '', 'Waldo'), 'Waldo', "Returns a customized coalesce function");
|
t.deepEqual(customCoalesce(undefined, null, NaN, '', 'Waldo'), 'Waldo', "Returns a customized coalesce function");
|
||||||
//t.deepEqual(coalesceFactory(args..), 'Expected');
|
//t.deepEqual(coalesceFactory(args..), 'Expected');
|
||||||
//t.equal(coalesceFactory(args..), 'Expected');
|
//t.equal(coalesceFactory(args..), 'Expected');
|
||||||
//t.false(coalesceFactory(args..), 'Expected');
|
//t.false(coalesceFactory(args..), 'Expected');
|
||||||
//t.throws(coalesceFactory(args..), 'Expected');
|
//t.throws(coalesceFactory(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const collatz = require('./collatz.js');
|
const collatz = require('./collatz.js');
|
||||||
|
|
||||||
test('Testing collatz', (t) => {
|
test('Testing collatz', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof collatz === 'function', 'collatz is a Function');
|
t.true(typeof collatz === 'function', 'collatz is a Function');
|
||||||
//t.deepEqual(collatz(args..), 'Expected');
|
//t.deepEqual(collatz(args..), 'Expected');
|
||||||
//t.equal(collatz(args..), 'Expected');
|
//t.equal(collatz(args..), 'Expected');
|
||||||
//t.false(collatz(args..), 'Expected');
|
//t.false(collatz(args..), 'Expected');
|
||||||
//t.throws(collatz(args..), 'Expected');
|
//t.throws(collatz(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const collectInto = require('./collectInto.js');
|
const collectInto = require('./collectInto.js');
|
||||||
|
|
||||||
test('Testing collectInto', (t) => {
|
test('Testing collectInto', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof collectInto === 'function', 'collectInto is a Function');
|
t.true(typeof collectInto === 'function', 'collectInto is a Function');
|
||||||
//t.deepEqual(collectInto(args..), 'Expected');
|
//t.deepEqual(collectInto(args..), 'Expected');
|
||||||
//t.equal(collectInto(args..), 'Expected');
|
//t.equal(collectInto(args..), 'Expected');
|
||||||
//t.false(collectInto(args..), 'Expected');
|
//t.false(collectInto(args..), 'Expected');
|
||||||
//t.throws(collectInto(args..), 'Expected');
|
//t.throws(collectInto(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const colorize = require('./colorize.js');
|
const colorize = require('./colorize.js');
|
||||||
|
|
||||||
test('Testing colorize', (t) => {
|
test('Testing colorize', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof colorize === 'function', 'colorize is a Function');
|
t.true(typeof colorize === 'function', 'colorize is a Function');
|
||||||
//t.deepEqual(colorize(args..), 'Expected');
|
//t.deepEqual(colorize(args..), 'Expected');
|
||||||
//t.equal(colorize(args..), 'Expected');
|
//t.equal(colorize(args..), 'Expected');
|
||||||
//t.false(colorize(args..), 'Expected');
|
//t.false(colorize(args..), 'Expected');
|
||||||
//t.throws(colorize(args..), 'Expected');
|
//t.throws(colorize(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const compact = require('./compact.js');
|
const compact = require('./compact.js');
|
||||||
|
|
||||||
test('Testing compact', (t) => {
|
test('Testing compact', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof compact === 'function', 'compact is a Function');
|
t.true(typeof compact === 'function', 'compact is a Function');
|
||||||
t.deepEqual(compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34]), [ 1, 2, 3, 'a', 's', 34 ], "Removes falsey values from an array");
|
t.deepEqual(compact([0, 1, false, 2, '', 3, 'a', 'e' * 23, NaN, 's', 34]), [ 1, 2, 3, 'a', 's', 34 ], "Removes falsey values from an array");
|
||||||
//t.deepEqual(compact(args..), 'Expected');
|
//t.deepEqual(compact(args..), 'Expected');
|
||||||
//t.equal(compact(args..), 'Expected');
|
//t.equal(compact(args..), 'Expected');
|
||||||
//t.false(compact(args..), 'Expected');
|
//t.false(compact(args..), 'Expected');
|
||||||
//t.throws(compact(args..), 'Expected');
|
//t.throws(compact(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,16 +2,16 @@ const test = require('tape');
|
|||||||
const compose = require('./compose.js');
|
const compose = require('./compose.js');
|
||||||
|
|
||||||
test('Testing compose', (t) => {
|
test('Testing compose', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof compose === 'function', 'compose is a Function');
|
t.true(typeof compose === 'function', 'compose is a Function');
|
||||||
const add5 = x => x + 5;
|
const add5 = x => x + 5;
|
||||||
const multiply = (x, y) => x * y;
|
const multiply = (x, y) => x * y;
|
||||||
const multiplyAndAdd5 = compose(add5, multiply);
|
const multiplyAndAdd5 = compose(add5, multiply);
|
||||||
t.equal(multiplyAndAdd5(5, 2), 15, "Performs right-to-left function composition");
|
t.equal(multiplyAndAdd5(5, 2), 15, "Performs right-to-left function composition");
|
||||||
//t.deepEqual(compose(args..), 'Expected');
|
//t.deepEqual(compose(args..), 'Expected');
|
||||||
//t.equal(compose(args..), 'Expected');
|
//t.equal(compose(args..), 'Expected');
|
||||||
//t.false(compose(args..), 'Expected');
|
//t.false(compose(args..), 'Expected');
|
||||||
//t.throws(compose(args..), 'Expected');
|
//t.throws(compose(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,16 +2,16 @@ const test = require('tape');
|
|||||||
const composeRight = require('./composeRight.js');
|
const composeRight = require('./composeRight.js');
|
||||||
|
|
||||||
test('Testing composeRight', (t) => {
|
test('Testing composeRight', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof composeRight === 'function', 'composeRight is a Function');
|
t.true(typeof composeRight === 'function', 'composeRight is a Function');
|
||||||
const add = (x, y) => x + y;
|
const add = (x, y) => x + y;
|
||||||
const square = x => x * x;
|
const square = x => x * x;
|
||||||
const addAndSquare = composeRight(add, square);
|
const addAndSquare = composeRight(add, square);
|
||||||
t.equal(addAndSquare(1, 2), 9, "Performs left-to-right function composition");
|
t.equal(addAndSquare(1, 2), 9, "Performs left-to-right function composition");
|
||||||
//t.deepEqual(composeRight(args..), 'Expected');
|
//t.deepEqual(composeRight(args..), 'Expected');
|
||||||
//t.equal(composeRight(args..), 'Expected');
|
//t.equal(composeRight(args..), 'Expected');
|
||||||
//t.false(composeRight(args..), 'Expected');
|
//t.false(composeRight(args..), 'Expected');
|
||||||
//t.throws(composeRight(args..), 'Expected');
|
//t.throws(composeRight(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const copyToClipboard = require('./copyToClipboard.js');
|
const copyToClipboard = require('./copyToClipboard.js');
|
||||||
|
|
||||||
test('Testing copyToClipboard', (t) => {
|
test('Testing copyToClipboard', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof copyToClipboard === 'function', 'copyToClipboard is a Function');
|
t.true(typeof copyToClipboard === 'function', 'copyToClipboard is a Function');
|
||||||
//t.deepEqual(copyToClipboard(args..), 'Expected');
|
//t.deepEqual(copyToClipboard(args..), 'Expected');
|
||||||
//t.equal(copyToClipboard(args..), 'Expected');
|
//t.equal(copyToClipboard(args..), 'Expected');
|
||||||
//t.false(copyToClipboard(args..), 'Expected');
|
//t.false(copyToClipboard(args..), 'Expected');
|
||||||
//t.throws(copyToClipboard(args..), 'Expected');
|
//t.throws(copyToClipboard(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const countBy = require('./countBy.js');
|
const countBy = require('./countBy.js');
|
||||||
|
|
||||||
test('Testing countBy', (t) => {
|
test('Testing countBy', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof countBy === 'function', 'countBy is a Function');
|
t.true(typeof countBy === 'function', 'countBy is a Function');
|
||||||
//t.deepEqual(countBy(args..), 'Expected');
|
//t.deepEqual(countBy(args..), 'Expected');
|
||||||
//t.equal(countBy(args..), 'Expected');
|
//t.equal(countBy(args..), 'Expected');
|
||||||
//t.false(countBy(args..), 'Expected');
|
//t.false(countBy(args..), 'Expected');
|
||||||
//t.throws(countBy(args..), 'Expected');
|
//t.throws(countBy(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const countOccurrences = require('./countOccurrences.js');
|
const countOccurrences = require('./countOccurrences.js');
|
||||||
|
|
||||||
test('Testing countOccurrences', (t) => {
|
test('Testing countOccurrences', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof countOccurrences === 'function', 'countOccurrences is a Function');
|
t.true(typeof countOccurrences === 'function', 'countOccurrences is a Function');
|
||||||
t.deepEqual(countOccurrences([1, 1, 2, 1, 2, 3], 1), 3, "Counts the occurrences of a value in an array");
|
t.deepEqual(countOccurrences([1, 1, 2, 1, 2, 3], 1), 3, "Counts the occurrences of a value in an array");
|
||||||
//t.deepEqual(countOccurrences(args..), 'Expected');
|
//t.deepEqual(countOccurrences(args..), 'Expected');
|
||||||
//t.equal(countOccurrences(args..), 'Expected');
|
//t.equal(countOccurrences(args..), 'Expected');
|
||||||
//t.false(countOccurrences(args..), 'Expected');
|
//t.false(countOccurrences(args..), 'Expected');
|
||||||
//t.throws(countOccurrences(args..), 'Expected');
|
//t.throws(countOccurrences(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const countVowels = require('./countVowels.js');
|
const countVowels = require('./countVowels.js');
|
||||||
|
|
||||||
test('Testing countVowels', (t) => {
|
test('Testing countVowels', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof countVowels === 'function', 'countVowels is a Function');
|
t.true(typeof countVowels === 'function', 'countVowels is a Function');
|
||||||
//t.deepEqual(countVowels(args..), 'Expected');
|
//t.deepEqual(countVowels(args..), 'Expected');
|
||||||
//t.equal(countVowels(args..), 'Expected');
|
//t.equal(countVowels(args..), 'Expected');
|
||||||
//t.false(countVowels(args..), 'Expected');
|
//t.false(countVowels(args..), 'Expected');
|
||||||
//t.throws(countVowels(args..), 'Expected');
|
//t.throws(countVowels(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const createElement = require('./createElement.js');
|
const createElement = require('./createElement.js');
|
||||||
|
|
||||||
test('Testing createElement', (t) => {
|
test('Testing createElement', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof createElement === 'function', 'createElement is a Function');
|
t.true(typeof createElement === 'function', 'createElement is a Function');
|
||||||
//t.deepEqual(createElement(args..), 'Expected');
|
//t.deepEqual(createElement(args..), 'Expected');
|
||||||
//t.equal(createElement(args..), 'Expected');
|
//t.equal(createElement(args..), 'Expected');
|
||||||
//t.false(createElement(args..), 'Expected');
|
//t.false(createElement(args..), 'Expected');
|
||||||
//t.throws(createElement(args..), 'Expected');
|
//t.throws(createElement(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const createEventHub = require('./createEventHub.js');
|
const createEventHub = require('./createEventHub.js');
|
||||||
|
|
||||||
test('Testing createEventHub', (t) => {
|
test('Testing createEventHub', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof createEventHub === 'function', 'createEventHub is a Function');
|
t.true(typeof createEventHub === 'function', 'createEventHub is a Function');
|
||||||
//t.deepEqual(createEventHub(args..), 'Expected');
|
//t.deepEqual(createEventHub(args..), 'Expected');
|
||||||
//t.equal(createEventHub(args..), 'Expected');
|
//t.equal(createEventHub(args..), 'Expected');
|
||||||
//t.false(createEventHub(args..), 'Expected');
|
//t.false(createEventHub(args..), 'Expected');
|
||||||
//t.throws(createEventHub(args..), 'Expected');
|
//t.throws(createEventHub(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const currentURL = require('./currentURL.js');
|
const currentURL = require('./currentURL.js');
|
||||||
|
|
||||||
test('Testing currentURL', (t) => {
|
test('Testing currentURL', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof currentURL === 'function', 'currentURL is a Function');
|
t.true(typeof currentURL === 'function', 'currentURL is a Function');
|
||||||
//t.deepEqual(currentURL(args..), 'Expected');
|
//t.deepEqual(currentURL(args..), 'Expected');
|
||||||
//t.equal(currentURL(args..), 'Expected');
|
//t.equal(currentURL(args..), 'Expected');
|
||||||
//t.false(currentURL(args..), 'Expected');
|
//t.false(currentURL(args..), 'Expected');
|
||||||
//t.throws(currentURL(args..), 'Expected');
|
//t.throws(currentURL(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const curry = require('./curry.js');
|
const curry = require('./curry.js');
|
||||||
|
|
||||||
test('Testing curry', (t) => {
|
test('Testing curry', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof curry === 'function', 'curry is a Function');
|
t.true(typeof curry === 'function', 'curry is a Function');
|
||||||
t.equal(curry(Math.pow)(2)(10), 1024, "curries a Math.pow");
|
t.equal(curry(Math.pow)(2)(10), 1024, "curries a Math.pow");
|
||||||
t.equal(curry(Math.min, 3)(10)(50)(2), 2, "curries a Math.min");
|
t.equal(curry(Math.min, 3)(10)(50)(2), 2, "curries a Math.min");
|
||||||
//t.deepEqual(curry(args..), 'Expected');
|
//t.deepEqual(curry(args..), 'Expected');
|
||||||
//t.equal(curry(args..), 'Expected');
|
//t.equal(curry(args..), 'Expected');
|
||||||
//t.false(curry(args..), 'Expected');
|
//t.false(curry(args..), 'Expected');
|
||||||
//t.throws(curry(args..), 'Expected');
|
//t.throws(curry(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const decapitalize = require('./decapitalize.js');
|
const decapitalize = require('./decapitalize.js');
|
||||||
|
|
||||||
test('Testing decapitalize', (t) => {
|
test('Testing decapitalize', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof decapitalize === 'function', 'decapitalize is a Function');
|
t.true(typeof decapitalize === 'function', 'decapitalize is a Function');
|
||||||
//t.deepEqual(decapitalize(args..), 'Expected');
|
//t.deepEqual(decapitalize(args..), 'Expected');
|
||||||
//t.equal(decapitalize(args..), 'Expected');
|
//t.equal(decapitalize(args..), 'Expected');
|
||||||
//t.false(decapitalize(args..), 'Expected');
|
//t.false(decapitalize(args..), 'Expected');
|
||||||
//t.throws(decapitalize(args..), 'Expected');
|
//t.throws(decapitalize(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,16 +2,16 @@ const test = require('tape');
|
|||||||
const deepClone = require('./deepClone.js');
|
const deepClone = require('./deepClone.js');
|
||||||
|
|
||||||
test('Testing deepClone', (t) => {
|
test('Testing deepClone', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof deepClone === 'function', 'deepClone is a Function');
|
t.true(typeof deepClone === 'function', 'deepClone is a Function');
|
||||||
const a = { foo: 'bar', obj: { a: 1, b: 2 } };
|
const a = { foo: 'bar', obj: { a: 1, b: 2 } };
|
||||||
const b = deepClone(a);
|
const b = deepClone(a);
|
||||||
t.notEqual(a, b, 'Shallow cloning works');
|
t.notEqual(a, b, 'Shallow cloning works');
|
||||||
t.notEqual(a.obj, b.obj, 'Deep cloning works');
|
t.notEqual(a.obj, b.obj, 'Deep cloning works');
|
||||||
//t.deepEqual(deepClone(args..), 'Expected');
|
//t.deepEqual(deepClone(args..), 'Expected');
|
||||||
//t.equal(deepClone(args..), 'Expected');
|
//t.equal(deepClone(args..), 'Expected');
|
||||||
//t.false(deepClone(args..), 'Expected');
|
//t.false(deepClone(args..), 'Expected');
|
||||||
//t.throws(deepClone(args..), 'Expected');
|
//t.throws(deepClone(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const deepFlatten = require('./deepFlatten.js');
|
const deepFlatten = require('./deepFlatten.js');
|
||||||
|
|
||||||
test('Testing deepFlatten', (t) => {
|
test('Testing deepFlatten', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof deepFlatten === 'function', 'deepFlatten is a Function');
|
t.true(typeof deepFlatten === 'function', 'deepFlatten is a Function');
|
||||||
t.deepEqual(deepFlatten([1, [2], [[3], 4], 5]), [1, 2, 3, 4, 5], "Deep flattens an array");
|
t.deepEqual(deepFlatten([1, [2], [[3], 4], 5]), [1, 2, 3, 4, 5], "Deep flattens an array");
|
||||||
//t.deepEqual(deepFlatten(args..), 'Expected');
|
//t.deepEqual(deepFlatten(args..), 'Expected');
|
||||||
//t.equal(deepFlatten(args..), 'Expected');
|
//t.equal(deepFlatten(args..), 'Expected');
|
||||||
//t.false(deepFlatten(args..), 'Expected');
|
//t.false(deepFlatten(args..), 'Expected');
|
||||||
//t.throws(deepFlatten(args..), 'Expected');
|
//t.throws(deepFlatten(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const defaults = require('./defaults.js');
|
const defaults = require('./defaults.js');
|
||||||
|
|
||||||
test('Testing defaults', (t) => {
|
test('Testing defaults', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof defaults === 'function', 'defaults is a Function');
|
t.true(typeof defaults === 'function', 'defaults is a Function');
|
||||||
//t.deepEqual(defaults(args..), 'Expected');
|
//t.deepEqual(defaults(args..), 'Expected');
|
||||||
//t.equal(defaults(args..), 'Expected');
|
//t.equal(defaults(args..), 'Expected');
|
||||||
//t.false(defaults(args..), 'Expected');
|
//t.false(defaults(args..), 'Expected');
|
||||||
//t.throws(defaults(args..), 'Expected');
|
//t.throws(defaults(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const defer = require('./defer.js');
|
const defer = require('./defer.js');
|
||||||
|
|
||||||
test('Testing defer', (t) => {
|
test('Testing defer', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof defer === 'function', 'defer is a Function');
|
t.true(typeof defer === 'function', 'defer is a Function');
|
||||||
//t.deepEqual(defer(args..), 'Expected');
|
//t.deepEqual(defer(args..), 'Expected');
|
||||||
//t.equal(defer(args..), 'Expected');
|
//t.equal(defer(args..), 'Expected');
|
||||||
//t.false(defer(args..), 'Expected');
|
//t.false(defer(args..), 'Expected');
|
||||||
//t.throws(defer(args..), 'Expected');
|
//t.throws(defer(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const delay = require('./delay.js');
|
const delay = require('./delay.js');
|
||||||
|
|
||||||
test('Testing delay', (t) => {
|
test('Testing delay', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof delay === 'function', 'delay is a Function');
|
t.true(typeof delay === 'function', 'delay is a Function');
|
||||||
//t.deepEqual(delay(args..), 'Expected');
|
//t.deepEqual(delay(args..), 'Expected');
|
||||||
//t.equal(delay(args..), 'Expected');
|
//t.equal(delay(args..), 'Expected');
|
||||||
//t.false(delay(args..), 'Expected');
|
//t.false(delay(args..), 'Expected');
|
||||||
//t.throws(delay(args..), 'Expected');
|
//t.throws(delay(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const detectDeviceType = require('./detectDeviceType.js');
|
const detectDeviceType = require('./detectDeviceType.js');
|
||||||
|
|
||||||
test('Testing detectDeviceType', (t) => {
|
test('Testing detectDeviceType', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof detectDeviceType === 'function', 'detectDeviceType is a Function');
|
t.true(typeof detectDeviceType === 'function', 'detectDeviceType is a Function');
|
||||||
//t.deepEqual(detectDeviceType(args..), 'Expected');
|
//t.deepEqual(detectDeviceType(args..), 'Expected');
|
||||||
//t.equal(detectDeviceType(args..), 'Expected');
|
//t.equal(detectDeviceType(args..), 'Expected');
|
||||||
//t.false(detectDeviceType(args..), 'Expected');
|
//t.false(detectDeviceType(args..), 'Expected');
|
||||||
//t.throws(detectDeviceType(args..), 'Expected');
|
//t.throws(detectDeviceType(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const difference = require('./difference.js');
|
const difference = require('./difference.js');
|
||||||
|
|
||||||
test('Testing difference', (t) => {
|
test('Testing difference', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof difference === 'function', 'difference is a Function');
|
t.true(typeof difference === 'function', 'difference is a Function');
|
||||||
t.deepEqual(difference([1, 2, 3], [1, 2, 4]), [3], "Returns the difference between two arrays");
|
t.deepEqual(difference([1, 2, 3], [1, 2, 4]), [3], "Returns the difference between two arrays");
|
||||||
//t.deepEqual(difference(args..), 'Expected');
|
//t.deepEqual(difference(args..), 'Expected');
|
||||||
//t.equal(difference(args..), 'Expected');
|
//t.equal(difference(args..), 'Expected');
|
||||||
//t.false(difference(args..), 'Expected');
|
//t.false(difference(args..), 'Expected');
|
||||||
//t.throws(difference(args..), 'Expected');
|
//t.throws(difference(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const differenceBy = require('./differenceBy.js');
|
const differenceBy = require('./differenceBy.js');
|
||||||
|
|
||||||
test('Testing differenceBy', (t) => {
|
test('Testing differenceBy', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof differenceBy === 'function', 'differenceBy is a Function');
|
t.true(typeof differenceBy === 'function', 'differenceBy is a Function');
|
||||||
//t.deepEqual(differenceBy(args..), 'Expected');
|
//t.deepEqual(differenceBy(args..), 'Expected');
|
||||||
//t.equal(differenceBy(args..), 'Expected');
|
//t.equal(differenceBy(args..), 'Expected');
|
||||||
//t.false(differenceBy(args..), 'Expected');
|
//t.false(differenceBy(args..), 'Expected');
|
||||||
//t.throws(differenceBy(args..), 'Expected');
|
//t.throws(differenceBy(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const differenceWith = require('./differenceWith.js');
|
const differenceWith = require('./differenceWith.js');
|
||||||
|
|
||||||
test('Testing differenceWith', (t) => {
|
test('Testing differenceWith', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof differenceWith === 'function', 'differenceWith is a Function');
|
t.true(typeof differenceWith === 'function', 'differenceWith is a Function');
|
||||||
t.deepEqual(differenceWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0], (a, b) => Math.round(a) === Math.round(b)), [1, 1.2], "Filters out all values from an array");
|
t.deepEqual(differenceWith([1, 1.2, 1.5, 3, 0], [1.9, 3, 0], (a, b) => Math.round(a) === Math.round(b)), [1, 1.2], "Filters out all values from an array");
|
||||||
//t.deepEqual(differenceWith(args..), 'Expected');
|
//t.deepEqual(differenceWith(args..), 'Expected');
|
||||||
//t.equal(differenceWith(args..), 'Expected');
|
//t.equal(differenceWith(args..), 'Expected');
|
||||||
//t.false(differenceWith(args..), 'Expected');
|
//t.false(differenceWith(args..), 'Expected');
|
||||||
//t.throws(differenceWith(args..), 'Expected');
|
//t.throws(differenceWith(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const digitize = require('./digitize.js');
|
const digitize = require('./digitize.js');
|
||||||
|
|
||||||
test('Testing digitize', (t) => {
|
test('Testing digitize', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof digitize === 'function', 'digitize is a Function');
|
t.true(typeof digitize === 'function', 'digitize is a Function');
|
||||||
t.deepEqual(digitize(123), [1, 2, 3], "Converts a number to an array of digits");
|
t.deepEqual(digitize(123), [1, 2, 3], "Converts a number to an array of digits");
|
||||||
//t.deepEqual(digitize(args..), 'Expected');
|
//t.deepEqual(digitize(args..), 'Expected');
|
||||||
//t.equal(digitize(args..), 'Expected');
|
//t.equal(digitize(args..), 'Expected');
|
||||||
//t.false(digitize(args..), 'Expected');
|
//t.false(digitize(args..), 'Expected');
|
||||||
//t.throws(digitize(args..), 'Expected');
|
//t.throws(digitize(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const distance = require('./distance.js');
|
const distance = require('./distance.js');
|
||||||
|
|
||||||
test('Testing distance', (t) => {
|
test('Testing distance', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof distance === 'function', 'distance is a Function');
|
t.true(typeof distance === 'function', 'distance is a Function');
|
||||||
//t.deepEqual(distance(args..), 'Expected');
|
//t.deepEqual(distance(args..), 'Expected');
|
||||||
//t.equal(distance(args..), 'Expected');
|
//t.equal(distance(args..), 'Expected');
|
||||||
//t.false(distance(args..), 'Expected');
|
//t.false(distance(args..), 'Expected');
|
||||||
//t.throws(distance(args..), 'Expected');
|
//t.throws(distance(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const dropElements = require('./dropElements.js');
|
const dropElements = require('./dropElements.js');
|
||||||
|
|
||||||
test('Testing dropElements', (t) => {
|
test('Testing dropElements', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof dropElements === 'function', 'dropElements is a Function');
|
t.true(typeof dropElements === 'function', 'dropElements is a Function');
|
||||||
t.deepEqual(dropElements([1, 2, 3, 4], n => n >= 3), [3,4], "Removes elements in an array until the passed function returns true");
|
t.deepEqual(dropElements([1, 2, 3, 4], n => n >= 3), [3,4], "Removes elements in an array until the passed function returns true");
|
||||||
//t.deepEqual(dropElements(args..), 'Expected');
|
//t.deepEqual(dropElements(args..), 'Expected');
|
||||||
//t.equal(dropElements(args..), 'Expected');
|
//t.equal(dropElements(args..), 'Expected');
|
||||||
//t.false(dropElements(args..), 'Expected');
|
//t.false(dropElements(args..), 'Expected');
|
||||||
//t.throws(dropElements(args..), 'Expected');
|
//t.throws(dropElements(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,15 +2,15 @@ const test = require('tape');
|
|||||||
const dropRight = require('./dropRight.js');
|
const dropRight = require('./dropRight.js');
|
||||||
|
|
||||||
test('Testing dropRight', (t) => {
|
test('Testing dropRight', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof dropRight === 'function', 'dropRight is a Function');
|
t.true(typeof dropRight === 'function', 'dropRight is a Function');
|
||||||
t.deepEqual(dropRight([1, 2, 3]), [1,2], "Returns a new array with n elements removed from the right");
|
t.deepEqual(dropRight([1, 2, 3]), [1,2], "Returns a new array with n elements removed from the right");
|
||||||
t.deepEqual(dropRight([1, 2, 3], 2), [1], "Returns a new array with n elements removed from the right");
|
t.deepEqual(dropRight([1, 2, 3], 2), [1], "Returns a new array with n elements removed from the right");
|
||||||
t.deepEqual(dropRight([1, 2, 3], 42), [], "Returns a new array with n elements removed from the right");
|
t.deepEqual(dropRight([1, 2, 3], 42), [], "Returns a new array with n elements removed from the right");
|
||||||
//t.deepEqual(dropRight(args..), 'Expected');
|
//t.deepEqual(dropRight(args..), 'Expected');
|
||||||
//t.equal(dropRight(args..), 'Expected');
|
//t.equal(dropRight(args..), 'Expected');
|
||||||
//t.false(dropRight(args..), 'Expected');
|
//t.false(dropRight(args..), 'Expected');
|
||||||
//t.throws(dropRight(args..), 'Expected');
|
//t.throws(dropRight(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const elementIsVisibleInViewport = require('./elementIsVisibleInViewport.js');
|
const elementIsVisibleInViewport = require('./elementIsVisibleInViewport.js');
|
||||||
|
|
||||||
test('Testing elementIsVisibleInViewport', (t) => {
|
test('Testing elementIsVisibleInViewport', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof elementIsVisibleInViewport === 'function', 'elementIsVisibleInViewport is a Function');
|
t.true(typeof elementIsVisibleInViewport === 'function', 'elementIsVisibleInViewport is a Function');
|
||||||
//t.deepEqual(elementIsVisibleInViewport(args..), 'Expected');
|
//t.deepEqual(elementIsVisibleInViewport(args..), 'Expected');
|
||||||
//t.equal(elementIsVisibleInViewport(args..), 'Expected');
|
//t.equal(elementIsVisibleInViewport(args..), 'Expected');
|
||||||
//t.false(elementIsVisibleInViewport(args..), 'Expected');
|
//t.false(elementIsVisibleInViewport(args..), 'Expected');
|
||||||
//t.throws(elementIsVisibleInViewport(args..), 'Expected');
|
//t.throws(elementIsVisibleInViewport(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,15 +2,15 @@ const test = require('tape');
|
|||||||
const elo = require('./elo.js');
|
const elo = require('./elo.js');
|
||||||
|
|
||||||
test('Testing elo', (t) => {
|
test('Testing elo', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof elo === 'function', 'elo is a Function');
|
t.true(typeof elo === 'function', 'elo is a Function');
|
||||||
t.deepEqual(elo([1200, 1200]), [1216, 1184], "Standard 1v1s");
|
t.deepEqual(elo([1200, 1200]), [1216, 1184], "Standard 1v1s");
|
||||||
t.deepEqual(elo([1200, 1200], 64), [1232, 1168]), "Standard 1v1s";
|
t.deepEqual(elo([1200, 1200], 64), [1232, 1168]), "Standard 1v1s";
|
||||||
t.deepEqual(elo([1200, 1200, 1200, 1200]).map(Math.round), [1246, 1215, 1185, 1154], "4 player FFA, all same rank");
|
t.deepEqual(elo([1200, 1200, 1200, 1200]).map(Math.round), [1246, 1215, 1185, 1154], "4 player FFA, all same rank");
|
||||||
//t.deepEqual(elo(args..), 'Expected');
|
//t.deepEqual(elo(args..), 'Expected');
|
||||||
//t.equal(elo(args..), 'Expected');
|
//t.equal(elo(args..), 'Expected');
|
||||||
//t.false(elo(args..), 'Expected');
|
//t.false(elo(args..), 'Expected');
|
||||||
//t.throws(elo(args..), 'Expected');
|
//t.throws(elo(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,17 +2,17 @@ const test = require('tape');
|
|||||||
const equals = require('./equals.js');
|
const equals = require('./equals.js');
|
||||||
|
|
||||||
test('Testing equals', (t) => {
|
test('Testing equals', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof equals === 'function', 'equals is a Function');
|
t.true(typeof equals === 'function', 'equals is a Function');
|
||||||
t.true(equals({ a: [2, {e: 3}], b: [4], c: 'foo' }, { a: [2, {e: 3}], b: [4], c: 'foo' }), "{ a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' }");
|
t.true(equals({ a: [2, {e: 3}], b: [4], c: 'foo' }, { a: [2, {e: 3}], b: [4], c: 'foo' }), "{ a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' }");
|
||||||
t.true(equals([1, 2, 3], [1, 2, 3]), '[1,2,3] is equal to [1,2,3]');
|
t.true(equals([1, 2, 3], [1, 2, 3]), '[1,2,3] is equal to [1,2,3]');
|
||||||
t.false(equals({ a: [2, 3], b: [4] }, { a: [2, 3], b: [6] }), '{ a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] }');
|
t.false(equals({ a: [2, 3], b: [4] }, { a: [2, 3], b: [6] }), '{ a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] }');
|
||||||
t.false(equals([1, 2, 3], [1, 2, 4]), '[1,2,3] is not equal to [1,2,4]');
|
t.false(equals([1, 2, 3], [1, 2, 4]), '[1,2,3] is not equal to [1,2,4]');
|
||||||
t.true(equals([1, 2, 3], { 0: 1, 1: 2, 2: 3 }), '[1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match.')
|
t.true(equals([1, 2, 3], { 0: 1, 1: 2, 2: 3 }), '[1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match.')
|
||||||
//t.deepEqual(equals(args..), 'Expected');
|
//t.deepEqual(equals(args..), 'Expected');
|
||||||
//t.equal(equals(args..), 'Expected');
|
//t.equal(equals(args..), 'Expected');
|
||||||
//t.false(equals(args..), 'Expected');
|
//t.false(equals(args..), 'Expected');
|
||||||
//t.throws(equals(args..), 'Expected');
|
//t.throws(equals(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const escapeHTML = require('./escapeHTML.js');
|
const escapeHTML = require('./escapeHTML.js');
|
||||||
|
|
||||||
test('Testing escapeHTML', (t) => {
|
test('Testing escapeHTML', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof escapeHTML === 'function', 'escapeHTML is a Function');
|
t.true(typeof escapeHTML === 'function', 'escapeHTML is a Function');
|
||||||
t.equal(escapeHTML('<a href="#">Me & you</a>'), '<a href="#">Me & you</a>', "Escapes a string for use in HTML");
|
t.equal(escapeHTML('<a href="#">Me & you</a>'), '<a href="#">Me & you</a>', "Escapes a string for use in HTML");
|
||||||
//t.deepEqual(escapeHTML(args..), 'Expected');
|
//t.deepEqual(escapeHTML(args..), 'Expected');
|
||||||
//t.equal(escapeHTML(args..), 'Expected');
|
//t.equal(escapeHTML(args..), 'Expected');
|
||||||
//t.false(escapeHTML(args..), 'Expected');
|
//t.false(escapeHTML(args..), 'Expected');
|
||||||
//t.throws(escapeHTML(args..), 'Expected');
|
//t.throws(escapeHTML(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const escapeRegExp = require('./escapeRegExp.js');
|
const escapeRegExp = require('./escapeRegExp.js');
|
||||||
|
|
||||||
test('Testing escapeRegExp', (t) => {
|
test('Testing escapeRegExp', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof escapeRegExp === 'function', 'escapeRegExp is a Function');
|
t.true(typeof escapeRegExp === 'function', 'escapeRegExp is a Function');
|
||||||
t.equal(escapeRegExp('(test)'), '\\(test\\)', "Escapes a string to use in a regular expression");
|
t.equal(escapeRegExp('(test)'), '\\(test\\)', "Escapes a string to use in a regular expression");
|
||||||
//t.deepEqual(escapeRegExp(args..), 'Expected');
|
//t.deepEqual(escapeRegExp(args..), 'Expected');
|
||||||
//t.equal(escapeRegExp(args..), 'Expected');
|
//t.equal(escapeRegExp(args..), 'Expected');
|
||||||
//t.false(escapeRegExp(args..), 'Expected');
|
//t.false(escapeRegExp(args..), 'Expected');
|
||||||
//t.throws(escapeRegExp(args..), 'Expected');
|
//t.throws(escapeRegExp(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const everyNth = require('./everyNth.js');
|
const everyNth = require('./everyNth.js');
|
||||||
|
|
||||||
test('Testing everyNth', (t) => {
|
test('Testing everyNth', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof everyNth === 'function', 'everyNth is a Function');
|
t.true(typeof everyNth === 'function', 'everyNth is a Function');
|
||||||
t.deepEqual(everyNth([1, 2, 3, 4, 5, 6], 2), [ 2, 4, 6 ], "Returns every nth element in an array");
|
t.deepEqual(everyNth([1, 2, 3, 4, 5, 6], 2), [ 2, 4, 6 ], "Returns every nth element in an array");
|
||||||
//t.deepEqual(everyNth(args..), 'Expected');
|
//t.deepEqual(everyNth(args..), 'Expected');
|
||||||
//t.equal(everyNth(args..), 'Expected');
|
//t.equal(everyNth(args..), 'Expected');
|
||||||
//t.false(everyNth(args..), 'Expected');
|
//t.false(everyNth(args..), 'Expected');
|
||||||
//t.throws(everyNth(args..), 'Expected');
|
//t.throws(everyNth(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const extendHex = require('./extendHex.js');
|
const extendHex = require('./extendHex.js');
|
||||||
|
|
||||||
test('Testing extendHex', (t) => {
|
test('Testing extendHex', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof extendHex === 'function', 'extendHex is a Function');
|
t.true(typeof extendHex === 'function', 'extendHex is a Function');
|
||||||
t.equal(extendHex('#03f'), '#0033ff', "Extends a 3-digit color code to a 6-digit color code");
|
t.equal(extendHex('#03f'), '#0033ff', "Extends a 3-digit color code to a 6-digit color code");
|
||||||
t.equal(extendHex('05a'), '#0055aa', "Extends a 3-digit color code to a 6-digit color code");
|
t.equal(extendHex('05a'), '#0055aa', "Extends a 3-digit color code to a 6-digit color code");
|
||||||
//t.deepEqual(extendHex(args..), 'Expected');
|
//t.deepEqual(extendHex(args..), 'Expected');
|
||||||
//t.equal(extendHex(args..), 'Expected');
|
//t.equal(extendHex(args..), 'Expected');
|
||||||
//t.false(extendHex(args..), 'Expected');
|
//t.false(extendHex(args..), 'Expected');
|
||||||
//t.throws(extendHex(args..), 'Expected');
|
//t.throws(extendHex(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,17 +2,17 @@ const test = require('tape');
|
|||||||
const factorial = require('./factorial.js');
|
const factorial = require('./factorial.js');
|
||||||
|
|
||||||
test('Testing factorial', (t) => {
|
test('Testing factorial', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof factorial === 'function', 'factorial is a Function');
|
t.true(typeof factorial === 'function', 'factorial is a Function');
|
||||||
t.equal(factorial(6), 720, "Calculates the factorial of 720");
|
t.equal(factorial(6), 720, "Calculates the factorial of 720");
|
||||||
t.equal(factorial(0), 1, "Calculates the factorial of 0");
|
t.equal(factorial(0), 1, "Calculates the factorial of 0");
|
||||||
t.equal(factorial(1), 1, "Calculates the factorial of 1");
|
t.equal(factorial(1), 1, "Calculates the factorial of 1");
|
||||||
t.equal(factorial(4), 24, "Calculates the factorial of 4");
|
t.equal(factorial(4), 24, "Calculates the factorial of 4");
|
||||||
t.equal(factorial(10), 3628800, "Calculates the factorial of 10");
|
t.equal(factorial(10), 3628800, "Calculates the factorial of 10");
|
||||||
//t.deepEqual(factorial(args..), 'Expected');
|
//t.deepEqual(factorial(args..), 'Expected');
|
||||||
//t.equal(factorial(args..), 'Expected');
|
//t.equal(factorial(args..), 'Expected');
|
||||||
//t.false(factorial(args..), 'Expected');
|
//t.false(factorial(args..), 'Expected');
|
||||||
//t.throws(factorial(args..), 'Expected');
|
//t.throws(factorial(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const factors = require('./factors.js');
|
const factors = require('./factors.js');
|
||||||
|
|
||||||
test('Testing factors', (t) => {
|
test('Testing factors', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof factors === 'function', 'factors is a Function');
|
t.true(typeof factors === 'function', 'factors is a Function');
|
||||||
//t.deepEqual(factors(args..), 'Expected');
|
//t.deepEqual(factors(args..), 'Expected');
|
||||||
//t.equal(factors(args..), 'Expected');
|
//t.equal(factors(args..), 'Expected');
|
||||||
//t.false(factors(args..), 'Expected');
|
//t.false(factors(args..), 'Expected');
|
||||||
//t.throws(factors(args..), 'Expected');
|
//t.throws(factors(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const fibonacci = require('./fibonacci.js');
|
const fibonacci = require('./fibonacci.js');
|
||||||
|
|
||||||
test('Testing fibonacci', (t) => {
|
test('Testing fibonacci', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof fibonacci === 'function', 'fibonacci is a Function');
|
t.true(typeof fibonacci === 'function', 'fibonacci is a Function');
|
||||||
t.deepEqual(fibonacci(6), [0, 1, 1, 2, 3, 5], "Generates an array, containing the Fibonacci sequence");
|
t.deepEqual(fibonacci(6), [0, 1, 1, 2, 3, 5], "Generates an array, containing the Fibonacci sequence");
|
||||||
//t.deepEqual(fibonacci(args..), 'Expected');
|
//t.deepEqual(fibonacci(args..), 'Expected');
|
||||||
//t.equal(fibonacci(args..), 'Expected');
|
//t.equal(fibonacci(args..), 'Expected');
|
||||||
//t.false(fibonacci(args..), 'Expected');
|
//t.false(fibonacci(args..), 'Expected');
|
||||||
//t.throws(fibonacci(args..), 'Expected');
|
//t.throws(fibonacci(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const fibonacciCountUntilNum = require('./fibonacciCountUntilNum.js');
|
const fibonacciCountUntilNum = require('./fibonacciCountUntilNum.js');
|
||||||
|
|
||||||
test('Testing fibonacciCountUntilNum', (t) => {
|
test('Testing fibonacciCountUntilNum', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof fibonacciCountUntilNum === 'function', 'fibonacciCountUntilNum is a Function');
|
t.true(typeof fibonacciCountUntilNum === 'function', 'fibonacciCountUntilNum is a Function');
|
||||||
//t.deepEqual(fibonacciCountUntilNum(args..), 'Expected');
|
//t.deepEqual(fibonacciCountUntilNum(args..), 'Expected');
|
||||||
//t.equal(fibonacciCountUntilNum(args..), 'Expected');
|
//t.equal(fibonacciCountUntilNum(args..), 'Expected');
|
||||||
//t.false(fibonacciCountUntilNum(args..), 'Expected');
|
//t.false(fibonacciCountUntilNum(args..), 'Expected');
|
||||||
//t.throws(fibonacciCountUntilNum(args..), 'Expected');
|
//t.throws(fibonacciCountUntilNum(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const fibonacciUntilNum = require('./fibonacciUntilNum.js');
|
const fibonacciUntilNum = require('./fibonacciUntilNum.js');
|
||||||
|
|
||||||
test('Testing fibonacciUntilNum', (t) => {
|
test('Testing fibonacciUntilNum', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof fibonacciUntilNum === 'function', 'fibonacciUntilNum is a Function');
|
t.true(typeof fibonacciUntilNum === 'function', 'fibonacciUntilNum is a Function');
|
||||||
//t.deepEqual(fibonacciUntilNum(args..), 'Expected');
|
//t.deepEqual(fibonacciUntilNum(args..), 'Expected');
|
||||||
//t.equal(fibonacciUntilNum(args..), 'Expected');
|
//t.equal(fibonacciUntilNum(args..), 'Expected');
|
||||||
//t.false(fibonacciUntilNum(args..), 'Expected');
|
//t.false(fibonacciUntilNum(args..), 'Expected');
|
||||||
//t.throws(fibonacciUntilNum(args..), 'Expected');
|
//t.throws(fibonacciUntilNum(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const filterNonUnique = require('./filterNonUnique.js');
|
const filterNonUnique = require('./filterNonUnique.js');
|
||||||
|
|
||||||
test('Testing filterNonUnique', (t) => {
|
test('Testing filterNonUnique', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof filterNonUnique === 'function', 'filterNonUnique is a Function');
|
t.true(typeof filterNonUnique === 'function', 'filterNonUnique is a Function');
|
||||||
t.deepEqual(filterNonUnique([1, 2, 2, 3, 4, 4, 5]), [1,3,5], "Filters out the non-unique values in an array");
|
t.deepEqual(filterNonUnique([1, 2, 2, 3, 4, 4, 5]), [1,3,5], "Filters out the non-unique values in an array");
|
||||||
//t.deepEqual(filterNonUnique(args..), 'Expected');
|
//t.deepEqual(filterNonUnique(args..), 'Expected');
|
||||||
//t.equal(filterNonUnique(args..), 'Expected');
|
//t.equal(filterNonUnique(args..), 'Expected');
|
||||||
//t.false(filterNonUnique(args..), 'Expected');
|
//t.false(filterNonUnique(args..), 'Expected');
|
||||||
//t.throws(filterNonUnique(args..), 'Expected');
|
//t.throws(filterNonUnique(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const findKey = require('./findKey.js');
|
const findKey = require('./findKey.js');
|
||||||
|
|
||||||
test('Testing findKey', (t) => {
|
test('Testing findKey', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof findKey === 'function', 'findKey is a Function');
|
t.true(typeof findKey === 'function', 'findKey is a Function');
|
||||||
//t.deepEqual(findKey(args..), 'Expected');
|
//t.deepEqual(findKey(args..), 'Expected');
|
||||||
//t.equal(findKey(args..), 'Expected');
|
//t.equal(findKey(args..), 'Expected');
|
||||||
//t.false(findKey(args..), 'Expected');
|
//t.false(findKey(args..), 'Expected');
|
||||||
//t.throws(findKey(args..), 'Expected');
|
//t.throws(findKey(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const findLast = require('./findLast.js');
|
const findLast = require('./findLast.js');
|
||||||
|
|
||||||
test('Testing findLast', (t) => {
|
test('Testing findLast', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof findLast === 'function', 'findLast is a Function');
|
t.true(typeof findLast === 'function', 'findLast is a Function');
|
||||||
//t.deepEqual(findLast(args..), 'Expected');
|
//t.deepEqual(findLast(args..), 'Expected');
|
||||||
//t.equal(findLast(args..), 'Expected');
|
//t.equal(findLast(args..), 'Expected');
|
||||||
//t.false(findLast(args..), 'Expected');
|
//t.false(findLast(args..), 'Expected');
|
||||||
//t.throws(findLast(args..), 'Expected');
|
//t.throws(findLast(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const findLastIndex = require('./findLastIndex.js');
|
const findLastIndex = require('./findLastIndex.js');
|
||||||
|
|
||||||
test('Testing findLastIndex', (t) => {
|
test('Testing findLastIndex', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof findLastIndex === 'function', 'findLastIndex is a Function');
|
t.true(typeof findLastIndex === 'function', 'findLastIndex is a Function');
|
||||||
//t.deepEqual(findLastIndex(args..), 'Expected');
|
//t.deepEqual(findLastIndex(args..), 'Expected');
|
||||||
//t.equal(findLastIndex(args..), 'Expected');
|
//t.equal(findLastIndex(args..), 'Expected');
|
||||||
//t.false(findLastIndex(args..), 'Expected');
|
//t.false(findLastIndex(args..), 'Expected');
|
||||||
//t.throws(findLastIndex(args..), 'Expected');
|
//t.throws(findLastIndex(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const findLastKey = require('./findLastKey.js');
|
const findLastKey = require('./findLastKey.js');
|
||||||
|
|
||||||
test('Testing findLastKey', (t) => {
|
test('Testing findLastKey', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof findLastKey === 'function', 'findLastKey is a Function');
|
t.true(typeof findLastKey === 'function', 'findLastKey is a Function');
|
||||||
//t.deepEqual(findLastKey(args..), 'Expected');
|
//t.deepEqual(findLastKey(args..), 'Expected');
|
||||||
//t.equal(findLastKey(args..), 'Expected');
|
//t.equal(findLastKey(args..), 'Expected');
|
||||||
//t.false(findLastKey(args..), 'Expected');
|
//t.false(findLastKey(args..), 'Expected');
|
||||||
//t.throws(findLastKey(args..), 'Expected');
|
//t.throws(findLastKey(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const flatten = require('./flatten.js');
|
const flatten = require('./flatten.js');
|
||||||
|
|
||||||
test('Testing flatten', (t) => {
|
test('Testing flatten', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof flatten === 'function', 'flatten is a Function');
|
t.true(typeof flatten === 'function', 'flatten is a Function');
|
||||||
t.deepEqual(flatten([1, [2], 3, 4]), [1, 2, 3, 4], "Flattens an array");
|
t.deepEqual(flatten([1, [2], 3, 4]), [1, 2, 3, 4], "Flattens an array");
|
||||||
t.deepEqual(flatten([1, [2, [3, [4, 5], 6], 7], 8], 2), [1, 2, 3, [4, 5], 6, 7, 8], "Flattens an array");
|
t.deepEqual(flatten([1, [2, [3, [4, 5], 6], 7], 8], 2), [1, 2, 3, [4, 5], 6, 7, 8], "Flattens an array");
|
||||||
//t.deepEqual(flatten(args..), 'Expected');
|
//t.deepEqual(flatten(args..), 'Expected');
|
||||||
//t.equal(flatten(args..), 'Expected');
|
//t.equal(flatten(args..), 'Expected');
|
||||||
//t.false(flatten(args..), 'Expected');
|
//t.false(flatten(args..), 'Expected');
|
||||||
//t.throws(flatten(args..), 'Expected');
|
//t.throws(flatten(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const flip = require('./flip.js');
|
const flip = require('./flip.js');
|
||||||
|
|
||||||
test('Testing flip', (t) => {
|
test('Testing flip', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof flip === 'function', 'flip is a Function');
|
t.true(typeof flip === 'function', 'flip is a Function');
|
||||||
//t.deepEqual(flip(args..), 'Expected');
|
//t.deepEqual(flip(args..), 'Expected');
|
||||||
//t.equal(flip(args..), 'Expected');
|
//t.equal(flip(args..), 'Expected');
|
||||||
//t.false(flip(args..), 'Expected');
|
//t.false(flip(args..), 'Expected');
|
||||||
//t.throws(flip(args..), 'Expected');
|
//t.throws(flip(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const forEachRight = require('./forEachRight.js');
|
const forEachRight = require('./forEachRight.js');
|
||||||
|
|
||||||
test('Testing forEachRight', (t) => {
|
test('Testing forEachRight', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof forEachRight === 'function', 'forEachRight is a Function');
|
t.true(typeof forEachRight === 'function', 'forEachRight is a Function');
|
||||||
//t.deepEqual(forEachRight(args..), 'Expected');
|
//t.deepEqual(forEachRight(args..), 'Expected');
|
||||||
//t.equal(forEachRight(args..), 'Expected');
|
//t.equal(forEachRight(args..), 'Expected');
|
||||||
//t.false(forEachRight(args..), 'Expected');
|
//t.false(forEachRight(args..), 'Expected');
|
||||||
//t.throws(forEachRight(args..), 'Expected');
|
//t.throws(forEachRight(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const forOwn = require('./forOwn.js');
|
const forOwn = require('./forOwn.js');
|
||||||
|
|
||||||
test('Testing forOwn', (t) => {
|
test('Testing forOwn', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof forOwn === 'function', 'forOwn is a Function');
|
t.true(typeof forOwn === 'function', 'forOwn is a Function');
|
||||||
//t.deepEqual(forOwn(args..), 'Expected');
|
//t.deepEqual(forOwn(args..), 'Expected');
|
||||||
//t.equal(forOwn(args..), 'Expected');
|
//t.equal(forOwn(args..), 'Expected');
|
||||||
//t.false(forOwn(args..), 'Expected');
|
//t.false(forOwn(args..), 'Expected');
|
||||||
//t.throws(forOwn(args..), 'Expected');
|
//t.throws(forOwn(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const forOwnRight = require('./forOwnRight.js');
|
const forOwnRight = require('./forOwnRight.js');
|
||||||
|
|
||||||
test('Testing forOwnRight', (t) => {
|
test('Testing forOwnRight', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof forOwnRight === 'function', 'forOwnRight is a Function');
|
t.true(typeof forOwnRight === 'function', 'forOwnRight is a Function');
|
||||||
//t.deepEqual(forOwnRight(args..), 'Expected');
|
//t.deepEqual(forOwnRight(args..), 'Expected');
|
||||||
//t.equal(forOwnRight(args..), 'Expected');
|
//t.equal(forOwnRight(args..), 'Expected');
|
||||||
//t.false(forOwnRight(args..), 'Expected');
|
//t.false(forOwnRight(args..), 'Expected');
|
||||||
//t.throws(forOwnRight(args..), 'Expected');
|
//t.throws(forOwnRight(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const formatDuration = require('./formatDuration.js');
|
const formatDuration = require('./formatDuration.js');
|
||||||
|
|
||||||
test('Testing formatDuration', (t) => {
|
test('Testing formatDuration', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof formatDuration === 'function', 'formatDuration is a Function');
|
t.true(typeof formatDuration === 'function', 'formatDuration is a Function');
|
||||||
t.equal(formatDuration(1001), '1 second, 1 millisecond', "Returns the human readable format of the given number of milliseconds");
|
t.equal(formatDuration(1001), '1 second, 1 millisecond', "Returns the human readable format of the given number of milliseconds");
|
||||||
t.equal(formatDuration(34325055574), '397 days, 6 hours, 44 minutes, 15 seconds, 574 milliseconds', "Returns the human readable format of the given number of milliseconds");
|
t.equal(formatDuration(34325055574), '397 days, 6 hours, 44 minutes, 15 seconds, 574 milliseconds', "Returns the human readable format of the given number of milliseconds");
|
||||||
//t.deepEqual(formatDuration(args..), 'Expected');
|
//t.deepEqual(formatDuration(args..), 'Expected');
|
||||||
//t.equal(formatDuration(args..), 'Expected');
|
//t.equal(formatDuration(args..), 'Expected');
|
||||||
//t.false(formatDuration(args..), 'Expected');
|
//t.false(formatDuration(args..), 'Expected');
|
||||||
//t.throws(formatDuration(args..), 'Expected');
|
//t.throws(formatDuration(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,15 +2,15 @@ const test = require('tape');
|
|||||||
const fromCamelCase = require('./fromCamelCase.js');
|
const fromCamelCase = require('./fromCamelCase.js');
|
||||||
|
|
||||||
test('Testing fromCamelCase', (t) => {
|
test('Testing fromCamelCase', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof fromCamelCase === 'function', 'fromCamelCase is a Function');
|
t.true(typeof fromCamelCase === 'function', 'fromCamelCase is a Function');
|
||||||
t.equal(fromCamelCase('someDatabaseFieldName', ' '), 'some database field name', "Converts a string from camelcase");
|
t.equal(fromCamelCase('someDatabaseFieldName', ' '), 'some database field name', "Converts a string from camelcase");
|
||||||
t.equal(fromCamelCase('someLabelThatNeedsToBeCamelized', '-'), 'some-label-that-needs-to-be-camelized', "Converts a string from camelcase");
|
t.equal(fromCamelCase('someLabelThatNeedsToBeCamelized', '-'), 'some-label-that-needs-to-be-camelized', "Converts a string from camelcase");
|
||||||
t.equal(fromCamelCase('someJavascriptProperty', '_'), 'some_javascript_property', "Converts a string from camelcase");
|
t.equal(fromCamelCase('someJavascriptProperty', '_'), 'some_javascript_property', "Converts a string from camelcase");
|
||||||
//t.deepEqual(fromCamelCase(args..), 'Expected');
|
//t.deepEqual(fromCamelCase(args..), 'Expected');
|
||||||
//t.equal(fromCamelCase(args..), 'Expected');
|
//t.equal(fromCamelCase(args..), 'Expected');
|
||||||
//t.false(fromCamelCase(args..), 'Expected');
|
//t.false(fromCamelCase(args..), 'Expected');
|
||||||
//t.throws(fromCamelCase(args..), 'Expected');
|
//t.throws(fromCamelCase(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const functionName = require('./functionName.js');
|
const functionName = require('./functionName.js');
|
||||||
|
|
||||||
test('Testing functionName', (t) => {
|
test('Testing functionName', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof functionName === 'function', 'functionName is a Function');
|
t.true(typeof functionName === 'function', 'functionName is a Function');
|
||||||
//t.deepEqual(functionName(args..), 'Expected');
|
//t.deepEqual(functionName(args..), 'Expected');
|
||||||
//t.equal(functionName(args..), 'Expected');
|
//t.equal(functionName(args..), 'Expected');
|
||||||
//t.false(functionName(args..), 'Expected');
|
//t.false(functionName(args..), 'Expected');
|
||||||
//t.throws(functionName(args..), 'Expected');
|
//t.throws(functionName(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const functions = require('./functions.js');
|
const functions = require('./functions.js');
|
||||||
|
|
||||||
test('Testing functions', (t) => {
|
test('Testing functions', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof functions === 'function', 'functions is a Function');
|
t.true(typeof functions === 'function', 'functions is a Function');
|
||||||
//t.deepEqual(functions(args..), 'Expected');
|
//t.deepEqual(functions(args..), 'Expected');
|
||||||
//t.equal(functions(args..), 'Expected');
|
//t.equal(functions(args..), 'Expected');
|
||||||
//t.false(functions(args..), 'Expected');
|
//t.false(functions(args..), 'Expected');
|
||||||
//t.throws(functions(args..), 'Expected');
|
//t.throws(functions(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const gcd = require('./gcd.js');
|
const gcd = require('./gcd.js');
|
||||||
|
|
||||||
test('Testing gcd', (t) => {
|
test('Testing gcd', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof gcd === 'function', 'gcd is a Function');
|
t.true(typeof gcd === 'function', 'gcd is a Function');
|
||||||
t.equal(gcd(8, 36), 4, "Calculates the greatest common divisor between two or more numbers/arrays");
|
t.equal(gcd(8, 36), 4, "Calculates the greatest common divisor between two or more numbers/arrays");
|
||||||
t.deepEqual(gcd(...[12, 8, 32]), 4, "Calculates the greatest common divisor between two or more numbers/arrays");
|
t.deepEqual(gcd(...[12, 8, 32]), 4, "Calculates the greatest common divisor between two or more numbers/arrays");
|
||||||
//t.deepEqual(gcd(args..), 'Expected');
|
//t.deepEqual(gcd(args..), 'Expected');
|
||||||
//t.equal(gcd(args..), 'Expected');
|
//t.equal(gcd(args..), 'Expected');
|
||||||
//t.false(gcd(args..), 'Expected');
|
//t.false(gcd(args..), 'Expected');
|
||||||
//t.throws(gcd(args..), 'Expected');
|
//t.throws(gcd(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,15 +2,15 @@ const test = require('tape');
|
|||||||
const geometricProgression = require('./geometricProgression.js');
|
const geometricProgression = require('./geometricProgression.js');
|
||||||
|
|
||||||
test('Testing geometricProgression', (t) => {
|
test('Testing geometricProgression', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof geometricProgression === 'function', 'geometricProgression is a Function');
|
t.true(typeof geometricProgression === 'function', 'geometricProgression is a Function');
|
||||||
t.deepEqual(geometricProgression(256), [1, 2, 4, 8, 16, 32, 64, 128, 256], "Initializes an array containing the numbers in the specified range");
|
t.deepEqual(geometricProgression(256), [1, 2, 4, 8, 16, 32, 64, 128, 256], "Initializes an array containing the numbers in the specified range");
|
||||||
t.deepEqual(geometricProgression(256, 3), [3, 6, 12, 24, 48, 96, 192], "Initializes an array containing the numbers in the specified range");
|
t.deepEqual(geometricProgression(256, 3), [3, 6, 12, 24, 48, 96, 192], "Initializes an array containing the numbers in the specified range");
|
||||||
t.deepEqual(geometricProgression(256, 1, 4), [1, 4, 16, 64, 256], "Initializes an array containing the numbers in the specified range");
|
t.deepEqual(geometricProgression(256, 1, 4), [1, 4, 16, 64, 256], "Initializes an array containing the numbers in the specified range");
|
||||||
//t.deepEqual(geometricProgression(args..), 'Expected');
|
//t.deepEqual(geometricProgression(args..), 'Expected');
|
||||||
//t.equal(geometricProgression(args..), 'Expected');
|
//t.equal(geometricProgression(args..), 'Expected');
|
||||||
//t.false(geometricProgression(args..), 'Expected');
|
//t.false(geometricProgression(args..), 'Expected');
|
||||||
//t.throws(geometricProgression(args..), 'Expected');
|
//t.throws(geometricProgression(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const get = require('./get.js');
|
const get = require('./get.js');
|
||||||
|
|
||||||
test('Testing get', (t) => {
|
test('Testing get', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof get === 'function', 'get is a Function');
|
t.true(typeof get === 'function', 'get is a Function');
|
||||||
const obj = { selector: { to: { val: 'val to get' } } };
|
const obj = { selector: { to: { val: 'val to get' } } };
|
||||||
t.deepEqual(get(obj, 'selector.to.val'), ['val to get'], "Retrieve a property indicated by the selector from an object.");
|
t.deepEqual(get(obj, 'selector.to.val'), ['val to get'], "Retrieve a property indicated by the selector from an object.");
|
||||||
//t.deepEqual(get(args..), 'Expected');
|
//t.deepEqual(get(args..), 'Expected');
|
||||||
//t.equal(get(args..), 'Expected');
|
//t.equal(get(args..), 'Expected');
|
||||||
//t.false(get(args..), 'Expected');
|
//t.false(get(args..), 'Expected');
|
||||||
//t.throws(get(args..), 'Expected');
|
//t.throws(get(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const getDaysDiffBetweenDates = require('./getDaysDiffBetweenDates.js');
|
const getDaysDiffBetweenDates = require('./getDaysDiffBetweenDates.js');
|
||||||
|
|
||||||
test('Testing getDaysDiffBetweenDates', (t) => {
|
test('Testing getDaysDiffBetweenDates', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof getDaysDiffBetweenDates === 'function', 'getDaysDiffBetweenDates is a Function');
|
t.true(typeof getDaysDiffBetweenDates === 'function', 'getDaysDiffBetweenDates is a Function');
|
||||||
t.equal(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22')), 9, "Returns the difference in days between two dates");
|
t.equal(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22')), 9, "Returns the difference in days between two dates");
|
||||||
//t.deepEqual(getDaysDiffBetweenDates(args..), 'Expected');
|
//t.deepEqual(getDaysDiffBetweenDates(args..), 'Expected');
|
||||||
//t.equal(getDaysDiffBetweenDates(args..), 'Expected');
|
//t.equal(getDaysDiffBetweenDates(args..), 'Expected');
|
||||||
//t.false(getDaysDiffBetweenDates(args..), 'Expected');
|
//t.false(getDaysDiffBetweenDates(args..), 'Expected');
|
||||||
//t.throws(getDaysDiffBetweenDates(args..), 'Expected');
|
//t.throws(getDaysDiffBetweenDates(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const getScrollPosition = require('./getScrollPosition.js');
|
const getScrollPosition = require('./getScrollPosition.js');
|
||||||
|
|
||||||
test('Testing getScrollPosition', (t) => {
|
test('Testing getScrollPosition', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof getScrollPosition === 'function', 'getScrollPosition is a Function');
|
t.true(typeof getScrollPosition === 'function', 'getScrollPosition is a Function');
|
||||||
//t.deepEqual(getScrollPosition(args..), 'Expected');
|
//t.deepEqual(getScrollPosition(args..), 'Expected');
|
||||||
//t.equal(getScrollPosition(args..), 'Expected');
|
//t.equal(getScrollPosition(args..), 'Expected');
|
||||||
//t.false(getScrollPosition(args..), 'Expected');
|
//t.false(getScrollPosition(args..), 'Expected');
|
||||||
//t.throws(getScrollPosition(args..), 'Expected');
|
//t.throws(getScrollPosition(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const getStyle = require('./getStyle.js');
|
const getStyle = require('./getStyle.js');
|
||||||
|
|
||||||
test('Testing getStyle', (t) => {
|
test('Testing getStyle', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof getStyle === 'function', 'getStyle is a Function');
|
t.true(typeof getStyle === 'function', 'getStyle is a Function');
|
||||||
//t.deepEqual(getStyle(args..), 'Expected');
|
//t.deepEqual(getStyle(args..), 'Expected');
|
||||||
//t.equal(getStyle(args..), 'Expected');
|
//t.equal(getStyle(args..), 'Expected');
|
||||||
//t.false(getStyle(args..), 'Expected');
|
//t.false(getStyle(args..), 'Expected');
|
||||||
//t.throws(getStyle(args..), 'Expected');
|
//t.throws(getStyle(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const getType = require('./getType.js');
|
const getType = require('./getType.js');
|
||||||
|
|
||||||
test('Testing getType', (t) => {
|
test('Testing getType', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof getType === 'function', 'getType is a Function');
|
t.true(typeof getType === 'function', 'getType is a Function');
|
||||||
t.equal(getType(new Set([1, 2, 3])), 'set', "Returns the native type of a value");
|
t.equal(getType(new Set([1, 2, 3])), 'set', "Returns the native type of a value");
|
||||||
//t.deepEqual(getType(args..), 'Expected');
|
//t.deepEqual(getType(args..), 'Expected');
|
||||||
//t.equal(getType(args..), 'Expected');
|
//t.equal(getType(args..), 'Expected');
|
||||||
//t.false(getType(args..), 'Expected');
|
//t.false(getType(args..), 'Expected');
|
||||||
//t.throws(getType(args..), 'Expected');
|
//t.throws(getType(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const getURLParameters = require('./getURLParameters.js');
|
const getURLParameters = require('./getURLParameters.js');
|
||||||
|
|
||||||
test('Testing getURLParameters', (t) => {
|
test('Testing getURLParameters', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof getURLParameters === 'function', 'getURLParameters is a Function');
|
t.true(typeof getURLParameters === 'function', 'getURLParameters is a Function');
|
||||||
t.deepEqual(getURLParameters('http://url.com/page?name=Adam&surname=Smith'), {name: 'Adam', surname: 'Smith'}, "Returns an object containing the parameters of the current URL");
|
t.deepEqual(getURLParameters('http://url.com/page?name=Adam&surname=Smith'), {name: 'Adam', surname: 'Smith'}, "Returns an object containing the parameters of the current URL");
|
||||||
//t.deepEqual(getURLParameters(args..), 'Expected');
|
//t.deepEqual(getURLParameters(args..), 'Expected');
|
||||||
//t.equal(getURLParameters(args..), 'Expected');
|
//t.equal(getURLParameters(args..), 'Expected');
|
||||||
//t.false(getURLParameters(args..), 'Expected');
|
//t.false(getURLParameters(args..), 'Expected');
|
||||||
//t.throws(getURLParameters(args..), 'Expected');
|
//t.throws(getURLParameters(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,14 +2,14 @@ const test = require('tape');
|
|||||||
const groupBy = require('./groupBy.js');
|
const groupBy = require('./groupBy.js');
|
||||||
|
|
||||||
test('Testing groupBy', (t) => {
|
test('Testing groupBy', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof groupBy === 'function', 'groupBy is a Function');
|
t.true(typeof groupBy === 'function', 'groupBy is a Function');
|
||||||
t.deepEqual(groupBy([6.1, 4.2, 6.3], Math.floor), {4: [4.2], 6: [6.1, 6.3]}, "Groups the elements of an array based on the given function");
|
t.deepEqual(groupBy([6.1, 4.2, 6.3], Math.floor), {4: [4.2], 6: [6.1, 6.3]}, "Groups the elements of an array based on the given function");
|
||||||
t.deepEqual(groupBy(['one', 'two', 'three'], 'length'), {3: ['one', 'two'], 5: ['three']}, "Groups the elements of an array based on the given function");
|
t.deepEqual(groupBy(['one', 'two', 'three'], 'length'), {3: ['one', 'two'], 5: ['three']}, "Groups the elements of an array based on the given function");
|
||||||
//t.deepEqual(groupBy(args..), 'Expected');
|
//t.deepEqual(groupBy(args..), 'Expected');
|
||||||
//t.equal(groupBy(args..), 'Expected');
|
//t.equal(groupBy(args..), 'Expected');
|
||||||
//t.false(groupBy(args..), 'Expected');
|
//t.false(groupBy(args..), 'Expected');
|
||||||
//t.throws(groupBy(args..), 'Expected');
|
//t.throws(groupBy(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const hammingDistance = require('./hammingDistance.js');
|
const hammingDistance = require('./hammingDistance.js');
|
||||||
|
|
||||||
test('Testing hammingDistance', (t) => {
|
test('Testing hammingDistance', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof hammingDistance === 'function', 'hammingDistance is a Function');
|
t.true(typeof hammingDistance === 'function', 'hammingDistance is a Function');
|
||||||
t.equal(hammingDistance(2, 3), 1, "retuns hamming disance between 2 values");
|
t.equal(hammingDistance(2, 3), 1, "retuns hamming disance between 2 values");
|
||||||
//t.deepEqual(hammingDistance(args..), 'Expected');
|
//t.deepEqual(hammingDistance(args..), 'Expected');
|
||||||
//t.equal(hammingDistance(args..), 'Expected');
|
//t.equal(hammingDistance(args..), 'Expected');
|
||||||
//t.false(hammingDistance(args..), 'Expected');
|
//t.false(hammingDistance(args..), 'Expected');
|
||||||
//t.throws(hammingDistance(args..), 'Expected');
|
//t.throws(hammingDistance(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const hasClass = require('./hasClass.js');
|
const hasClass = require('./hasClass.js');
|
||||||
|
|
||||||
test('Testing hasClass', (t) => {
|
test('Testing hasClass', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof hasClass === 'function', 'hasClass is a Function');
|
t.true(typeof hasClass === 'function', 'hasClass is a Function');
|
||||||
//t.deepEqual(hasClass(args..), 'Expected');
|
//t.deepEqual(hasClass(args..), 'Expected');
|
||||||
//t.equal(hasClass(args..), 'Expected');
|
//t.equal(hasClass(args..), 'Expected');
|
||||||
//t.false(hasClass(args..), 'Expected');
|
//t.false(hasClass(args..), 'Expected');
|
||||||
//t.throws(hasClass(args..), 'Expected');
|
//t.throws(hasClass(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const hasFlags = require('./hasFlags.js');
|
const hasFlags = require('./hasFlags.js');
|
||||||
|
|
||||||
test('Testing hasFlags', (t) => {
|
test('Testing hasFlags', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof hasFlags === 'function', 'hasFlags is a Function');
|
t.true(typeof hasFlags === 'function', 'hasFlags is a Function');
|
||||||
//t.deepEqual(hasFlags(args..), 'Expected');
|
//t.deepEqual(hasFlags(args..), 'Expected');
|
||||||
//t.equal(hasFlags(args..), 'Expected');
|
//t.equal(hasFlags(args..), 'Expected');
|
||||||
//t.false(hasFlags(args..), 'Expected');
|
//t.false(hasFlags(args..), 'Expected');
|
||||||
//t.throws(hasFlags(args..), 'Expected');
|
//t.throws(hasFlags(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const hashBrowser = require('./hashBrowser.js');
|
const hashBrowser = require('./hashBrowser.js');
|
||||||
|
|
||||||
test('Testing hashBrowser', (t) => {
|
test('Testing hashBrowser', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof hashBrowser === 'function', 'hashBrowser is a Function');
|
t.true(typeof hashBrowser === 'function', 'hashBrowser is a Function');
|
||||||
//t.deepEqual(hashBrowser(args..), 'Expected');
|
//t.deepEqual(hashBrowser(args..), 'Expected');
|
||||||
//t.equal(hashBrowser(args..), 'Expected');
|
//t.equal(hashBrowser(args..), 'Expected');
|
||||||
//t.false(hashBrowser(args..), 'Expected');
|
//t.false(hashBrowser(args..), 'Expected');
|
||||||
//t.throws(hashBrowser(args..), 'Expected');
|
//t.throws(hashBrowser(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,12 +2,12 @@ const test = require('tape');
|
|||||||
const hashNode = require('./hashNode.js');
|
const hashNode = require('./hashNode.js');
|
||||||
|
|
||||||
test('Testing hashNode', (t) => {
|
test('Testing hashNode', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof hashNode === 'function', 'hashNode is a Function');
|
t.true(typeof hashNode === 'function', 'hashNode is a Function');
|
||||||
//t.deepEqual(hashNode(args..), 'Expected');
|
//t.deepEqual(hashNode(args..), 'Expected');
|
||||||
//t.equal(hashNode(args..), 'Expected');
|
//t.equal(hashNode(args..), 'Expected');
|
||||||
//t.false(hashNode(args..), 'Expected');
|
//t.false(hashNode(args..), 'Expected');
|
||||||
//t.throws(hashNode(args..), 'Expected');
|
//t.throws(hashNode(args..), 'Expected');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
@ -2,13 +2,13 @@ const test = require('tape');
|
|||||||
const head = require('./head.js');
|
const head = require('./head.js');
|
||||||
|
|
||||||
test('Testing head', (t) => {
|
test('Testing head', (t) => {
|
||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof head === 'function', 'head is a Function');
|
t.true(typeof head === 'function', 'head is a Function');
|
||||||
t.true(head({ a: 1234}) === undefined, 'head({ a: 1234}) returns undefined');
|
t.true(head({ a: 1234}) === undefined, 'head({ a: 1234}) returns undefined');
|
||||||
t.equal(head([1, 2, 3]), 1, "head([1, 2, 3]) returns 1");
|
t.equal(head([1, 2, 3]), 1, "head([1, 2, 3]) returns 1");
|
||||||
t.equal(head({ 0: false}), false, 'head({ 0: false}) returns false');
|
t.equal(head({ 0: false}), false, 'head({ 0: false}) returns false');
|
||||||
t.equal(head('String'), 'S', 'head(String) returns S');
|
t.equal(head('String'), 'S', 'head(String) returns S');
|
||||||
t.throws(() => head(null), 'head(null) throws an Error');
|
t.throws(() => head(null), 'head(null) throws an Error');
|
||||||
t.throws(() => head(undefined), 'head(undefined) throws an Error');
|
t.throws(() => head(undefined), 'head(undefined) throws an Error');
|
||||||
t.throws(() => head(), 'head() throws an Error');
|
t.throws(() => head(), 'head() throws an Error');
|
||||||
@ -17,5 +17,5 @@ test('Testing head', (t) => {
|
|||||||
head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]);
|
head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]);
|
||||||
let end = new Date().getTime();
|
let end = new Date().getTime();
|
||||||
t.true((end - start) < 2000, 'head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run');
|
t.true((end - start) < 2000, 'head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run');
|
||||||
t.end();
|
t.end();
|
||||||
});
|
});
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user