Tests for omit, omitBy
This commit is contained in:
@ -5,9 +5,10 @@ test('Testing omit', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
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.equal(omit(args..), 'Expected');
|
||||
//t.false(omit(args..), 'Expected');
|
||||
//t.throws(omit(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
@ -5,9 +5,10 @@ test('Testing omitBy', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
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.equal(omitBy(args..), 'Expected');
|
||||
//t.false(omitBy(args..), 'Expected');
|
||||
//t.throws(omitBy(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
@ -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
|
||||
> 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
|
||||
|
||||
√ omit is a Function
|
||||
√ Omits the key-value pairs corresponding to the given keys from an object
|
||||
|
||||
Testing omitBy
|
||||
|
||||
√ omitBy is a Function
|
||||
√ Creates an object composed of the properties the given function returns falsey for
|
||||
|
||||
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
|
||||
|
||||
|
||||
total: 818
|
||||
passing: 818
|
||||
total: 820
|
||||
passing: 820
|
||||
duration: 2.4s
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user