Migrated tests to jest

Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
This commit is contained in:
Angelos Chalaris
2018-06-18 14:18:25 +03:00
parent 63ec2596cf
commit a59af893bf
890 changed files with 6950 additions and 6921 deletions

View File

@ -1,21 +1,16 @@
const test = require('tape');
const expect = require('expect');
const all = require('./all.js');
test('Testing all', (t) => {
test('Testing all', () => {
//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.true(all([4,1,2,3], x => x >= 1), 'Returns true with predicate function');
t.false(all([0,1], x => x >= 1), 'Returns false with a predicate function');
//t.deepEqual(all(args..), 'Expected');
//t.equal(all(args..), 'Expected');
//t.false(all(args..), 'Expected');
//t.throws(all(args..), 'Expected');
t.end();
expect(typeof all === 'function').toBeTruthy();
expect(all([4,1,2,3])).toBeTruthy();
expect(all([0,1])).toBeFalsy();
expect(all([NaN,1])).toBeFalsy();
expect(all([undefined,1])).toBeFalsy();
expect(all([null,1])).toBeFalsy();
expect(all(['',1])).toBeFalsy();
expect(all([4,1,2,3], x => x >= 1)).toBeTruthy();
expect(all([0,1], x => x >= 1)).toBeFalsy();
});