Files
30-seconds-of-code/test/all/all.test.js
Angelos Chalaris 5afe81452a Migrated tests to jest
Used jest-codemods to migrate, will have to pass everything by hand before we can merge.
2018-06-18 14:18:25 +03:00

17 lines
584 B
JavaScript

const expect = require('expect');
const all = require('./all.js');
test('Testing all', () => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
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();
});