Tests for flip, over, overArgs, pipeFunctions

This commit is contained in:
Angelos Chalaris
2018-02-04 16:54:49 +02:00
parent af0e163ec2
commit b1934902b0
5 changed files with 26 additions and 7 deletions

View File

@ -5,9 +5,13 @@ test('Testing overArgs', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof overArgs === 'function', 'overArgs is a Function');
const square = n => n * n;
const double = n => n * 2;
const fn = overArgs((x, y) => [x, y], [square, double]);
t.deepEqual(fn(9, 3), [81, 6], 'Invokes the provided function with its arguments transformed');
//t.deepEqual(overArgs(args..), 'Expected');
//t.equal(overArgs(args..), 'Expected');
//t.false(overArgs(args..), 'Expected');
//t.throws(overArgs(args..), 'Expected');
t.end();
});
});