Add any, anyBy, all, allBy, none, noneBy

This commit is contained in:
Angelos Chalaris
2018-02-14 11:46:15 +02:00
parent 096fa381f0
commit dd9bbaac65
20 changed files with 1185 additions and 953 deletions

19
test/all/all.test.js Normal file
View 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();
});