Add any, anyBy, all, allBy, none, noneBy
This commit is contained in:
19
test/all/all.test.js
Normal file
19
test/all/all.test.js
Normal file
@ -0,0 +1,19 @@
|
||||
const test = require('tape');
|
||||
const all = require('./all.js');
|
||||
|
||||
test('Testing all', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof all === 'function', 'all is a Function');
|
||||
t.true(all([4,1,2,3]), 'Returns true for arrays with no falsey values');
|
||||
t.false(all([0,1]), 'Returns false for arrays with 0');
|
||||
t.false(all([NaN,1]), 'Returns false for arrays with NaN');
|
||||
t.false(all([undefined,1]), 'Returns false for arrays with undefined');
|
||||
t.false(all([null,1]), 'Returns false for arrays with null');
|
||||
t.false(all(['',1]), 'Returns false for arrays with empty strings');
|
||||
//t.deepEqual(all(args..), 'Expected');
|
||||
//t.equal(all(args..), 'Expected');
|
||||
//t.false(all(args..), 'Expected');
|
||||
//t.throws(all(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user