Tests for omit, omitBy
This commit is contained in:
@ -5,6 +5,7 @@ test('Testing omit', (t) => {
|
|||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof omit === 'function', 'omit is a Function');
|
t.true(typeof omit === 'function', 'omit is a Function');
|
||||||
|
t.deepEqual(omit({ a: 1, b: '2', c: 3 }, ['b']), { 'a': 1, 'c': 3 }, 'Omits the key-value pairs corresponding to the given keys from an object');
|
||||||
//t.deepEqual(omit(args..), 'Expected');
|
//t.deepEqual(omit(args..), 'Expected');
|
||||||
//t.equal(omit(args..), 'Expected');
|
//t.equal(omit(args..), 'Expected');
|
||||||
//t.false(omit(args..), 'Expected');
|
//t.false(omit(args..), 'Expected');
|
||||||
|
|||||||
@ -5,6 +5,7 @@ test('Testing omitBy', (t) => {
|
|||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof omitBy === 'function', 'omitBy is a Function');
|
t.true(typeof omitBy === 'function', 'omitBy is a Function');
|
||||||
|
t.deepEqual(omitBy({ a: 1, b: '2', c: 3 }, x => typeof x === 'number'), { b: '2' }, 'Creates an object composed of the properties the given function returns falsey for');
|
||||||
//t.deepEqual(omitBy(args..), 'Expected');
|
//t.deepEqual(omitBy(args..), 'Expected');
|
||||||
//t.equal(omitBy(args..), 'Expected');
|
//t.equal(omitBy(args..), 'Expected');
|
||||||
//t.false(omitBy(args..), 'Expected');
|
//t.false(omitBy(args..), 'Expected');
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
Test log for: Sun Feb 04 2018 20:50:10 GMT+0200 (GTB Standard Time)
|
Test log for: Sun Feb 04 2018 20:53:05 GMT+0200 (GTB Standard Time)
|
||||||
|
|
||||||
> 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code
|
> 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code
|
||||||
> tape test/**/*.test.js | tap-spec
|
> tape test/**/*.test.js | tap-spec
|
||||||
@ -1024,10 +1024,12 @@ Test log for: Sun Feb 04 2018 20:50:10 GMT+0200 (GTB Standard Time)
|
|||||||
Testing omit
|
Testing omit
|
||||||
|
|
||||||
√ omit is a Function
|
√ omit is a Function
|
||||||
|
√ Omits the key-value pairs corresponding to the given keys from an object
|
||||||
|
|
||||||
Testing omitBy
|
Testing omitBy
|
||||||
|
|
||||||
√ omitBy is a Function
|
√ omitBy is a Function
|
||||||
|
√ Creates an object composed of the properties the given function returns falsey for
|
||||||
|
|
||||||
Testing on
|
Testing on
|
||||||
|
|
||||||
@ -1711,8 +1713,8 @@ Test log for: Sun Feb 04 2018 20:50:10 GMT+0200 (GTB Standard Time)
|
|||||||
√ Works with multiple promises
|
√ Works with multiple promises
|
||||||
|
|
||||||
|
|
||||||
total: 818
|
total: 820
|
||||||
passing: 818
|
passing: 820
|
||||||
duration: 2.4s
|
duration: 2.4s
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user