Tests for rearg, pickBy
This commit is contained in:
@ -5,9 +5,10 @@ test('Testing pickBy', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof pickBy === 'function', 'pickBy is a Function');
|
||||
t.deepEqual(pickBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number'), { 'a': 1, 'c': 3 }, 'Creates an object composed of the properties the given function returns truthy for.');
|
||||
//t.deepEqual(pickBy(args..), 'Expected');
|
||||
//t.equal(pickBy(args..), 'Expected');
|
||||
//t.false(pickBy(args..), 'Expected');
|
||||
//t.throws(pickBy(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
@ -5,9 +5,16 @@ test('Testing rearg', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof rearg === 'function', 'rearg is a Function');
|
||||
var rearged = rearg(
|
||||
function(a, b, c) {
|
||||
return [a, b, c];
|
||||
},
|
||||
[2, 0, 1]
|
||||
);
|
||||
t.deepEqual(rearged('b', 'c', 'a'), ['a', 'b', 'c'], 'Reorders arguments in invoked function');
|
||||
//t.deepEqual(rearg(args..), 'Expected');
|
||||
//t.equal(rearg(args..), 'Expected');
|
||||
//t.false(rearg(args..), 'Expected');
|
||||
//t.throws(rearg(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Test log for: Sun Feb 04 2018 16:54:16 GMT+0200 (GTB Standard Time)
|
||||
Test log for: Sun Feb 04 2018 16:57:01 GMT+0200 (GTB Standard Time)
|
||||
|
||||
> 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code
|
||||
> tape test/**/*.test.js | tap-spec
|
||||
@ -1089,6 +1089,7 @@ Test log for: Sun Feb 04 2018 16:54:16 GMT+0200 (GTB Standard Time)
|
||||
Testing pickBy
|
||||
|
||||
√ pickBy is a Function
|
||||
√ Creates an object composed of the properties the given function returns truthy for.
|
||||
|
||||
Testing pipeAsyncFunctions
|
||||
|
||||
@ -1181,6 +1182,7 @@ Test log for: Sun Feb 04 2018 16:54:16 GMT+0200 (GTB Standard Time)
|
||||
Testing rearg
|
||||
|
||||
√ rearg is a Function
|
||||
√ Reorders arguments in invoked function
|
||||
|
||||
Testing redirect
|
||||
|
||||
@ -1705,8 +1707,8 @@ Test log for: Sun Feb 04 2018 16:54:16 GMT+0200 (GTB Standard Time)
|
||||
√ Works with multiple promises
|
||||
|
||||
|
||||
total: 809
|
||||
passing: 809
|
||||
total: 811
|
||||
passing: 811
|
||||
duration: 2.4s
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user