Test migration to jest by hand

Apparently using regular expressions is way easier.
This commit is contained in:
Angelos Chalaris
2018-06-18 15:15:56 +03:00
parent 977949ca61
commit 4f7da1be9b
894 changed files with 5917 additions and 3607 deletions

2
test/over/over.js Normal file
View File

@ -0,0 +1,2 @@
const over = (...fns) => (...args) => fns.map(fn => fn.apply(null, args));
module.exports = over;

11
test/over/over.test.js Normal file
View File

@ -0,0 +1,11 @@
const expect = require('expect');
const over = require('./over.js');
test('over is a Function', () => {
expect(over).toBeInstanceOf(Function);
});
const minMax = over(Math.min, Math.max);
t.deepEqual(minMax(1, 2, 3, 4, 5), [1,5], 'Applies given functions over multiple arguments');