Tests for unfold, unary
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
Test log for: Sat Feb 03 2018 12:00:56 GMT+0200 (GTB Standard Time)
|
||||
Test log for: Sat Feb 03 2018 12:03:55 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
|
||||
@ -1459,6 +1459,7 @@ Test log for: Sat Feb 03 2018 12:00:56 GMT+0200 (GTB Standard Time)
|
||||
Testing unary
|
||||
|
||||
√ unary is a Function
|
||||
√ Discards arguments after the first one
|
||||
|
||||
Testing unescapeHTML
|
||||
|
||||
@ -1468,6 +1469,7 @@ Test log for: Sat Feb 03 2018 12:00:56 GMT+0200 (GTB Standard Time)
|
||||
Testing unfold
|
||||
|
||||
√ unfold is a Function
|
||||
√ Works with a given function, producing an array
|
||||
|
||||
Testing union
|
||||
|
||||
@ -1633,8 +1635,8 @@ Test log for: Sat Feb 03 2018 12:00:56 GMT+0200 (GTB Standard Time)
|
||||
√ Works with multiple promises
|
||||
|
||||
|
||||
total: 737
|
||||
passing: 737
|
||||
total: 739
|
||||
passing: 739
|
||||
duration: 2.4s
|
||||
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ test('Testing unary', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof unary === 'function', 'unary is a Function');
|
||||
t.deepEqual(['6', '8', '10'].map(unary(parseInt)), [6, 8, 10], 'Discards arguments after the first one');
|
||||
//t.deepEqual(unary(args..), 'Expected');
|
||||
//t.equal(unary(args..), 'Expected');
|
||||
//t.false(unary(args..), 'Expected');
|
||||
|
||||
@ -5,6 +5,8 @@ test('Testing unfold', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof unfold === 'function', 'unfold is a Function');
|
||||
var f = n => (n > 50 ? false : [-n, n + 10]);
|
||||
t.deepEqual(unfold(f, 10), [-10, -20, -30, -40, -50], 'Works with a given function, producing an array');
|
||||
//t.deepEqual(unfold(args..), 'Expected');
|
||||
//t.equal(unfold(args..), 'Expected');
|
||||
//t.false(unfold(args..), 'Expected');
|
||||
|
||||
Reference in New Issue
Block a user