Tests for sortedLastIndex, sortedLastIndexBy, sortedIndexBy
This commit is contained in:
@ -5,6 +5,7 @@ test('Testing sortedIndexBy', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof sortedIndexBy === 'function', 'sortedIndexBy is a Function');
|
||||
t.equal(sortedIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x), 0, 'Returns the lowest index to insert the element without messing up the list order');
|
||||
//t.deepEqual(sortedIndexBy(args..), 'Expected');
|
||||
//t.equal(sortedIndexBy(args..), 'Expected');
|
||||
//t.false(sortedIndexBy(args..), 'Expected');
|
||||
|
||||
@ -5,6 +5,7 @@ test('Testing sortedLastIndex', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof sortedLastIndex === 'function', 'sortedLastIndex is a Function');
|
||||
t.equal(sortedLastIndex([10, 20, 30, 30, 40], 30), 3, 'Returns the highest index to insert the element without messing up the list order');
|
||||
//t.deepEqual(sortedLastIndex(args..), 'Expected');
|
||||
//t.equal(sortedLastIndex(args..), 'Expected');
|
||||
//t.false(sortedLastIndex(args..), 'Expected');
|
||||
|
||||
@ -5,6 +5,7 @@ test('Testing sortedLastIndexBy', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof sortedLastIndexBy === 'function', 'sortedLastIndexBy is a Function');
|
||||
t.equal(sortedLastIndexBy([{ x: 4 }, { x: 5 }], { x: 4 }, o => o.x), 1, 'Returns the highest index to insert the element without messing up the list order');
|
||||
//t.deepEqual(sortedLastIndexBy(args..), 'Expected');
|
||||
//t.equal(sortedLastIndexBy(args..), 'Expected');
|
||||
//t.false(sortedLastIndexBy(args..), 'Expected');
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
Test log for: Sat Feb 03 2018 12:21:49 GMT+0200 (GTB Standard Time)
|
||||
Test log for: Sat Feb 03 2018 12:25:38 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
|
||||
@ -1263,14 +1263,17 @@ Test log for: Sat Feb 03 2018 12:21:49 GMT+0200 (GTB Standard Time)
|
||||
Testing sortedIndexBy
|
||||
|
||||
√ sortedIndexBy is a Function
|
||||
√ Returns the lowest index to insert the element without messing up the list order
|
||||
|
||||
Testing sortedLastIndex
|
||||
|
||||
√ sortedLastIndex is a Function
|
||||
√ Returns the highest index to insert the element without messing up the list order
|
||||
|
||||
Testing sortedLastIndexBy
|
||||
|
||||
√ sortedLastIndexBy is a Function
|
||||
√ Returns the highest index to insert the element without messing up the list order
|
||||
|
||||
Testing speechSynthesis
|
||||
|
||||
@ -1642,8 +1645,8 @@ Test log for: Sat Feb 03 2018 12:21:49 GMT+0200 (GTB Standard Time)
|
||||
√ Works with multiple promises
|
||||
|
||||
|
||||
total: 746
|
||||
passing: 746
|
||||
total: 749
|
||||
passing: 749
|
||||
duration: 2.4s
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user