diff --git a/test/sortedIndexBy/sortedIndexBy.test.js b/test/sortedIndexBy/sortedIndexBy.test.js index ca74bbf15..6f173a5b6 100644 --- a/test/sortedIndexBy/sortedIndexBy.test.js +++ b/test/sortedIndexBy/sortedIndexBy.test.js @@ -5,9 +5,10 @@ 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'); //t.throws(sortedIndexBy(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/sortedLastIndex/sortedLastIndex.test.js b/test/sortedLastIndex/sortedLastIndex.test.js index f51f3b732..cdb77d095 100644 --- a/test/sortedLastIndex/sortedLastIndex.test.js +++ b/test/sortedLastIndex/sortedLastIndex.test.js @@ -5,9 +5,10 @@ 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'); //t.throws(sortedLastIndex(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/sortedLastIndexBy/sortedLastIndexBy.test.js b/test/sortedLastIndexBy/sortedLastIndexBy.test.js index d681fb357..e7f19f6e9 100644 --- a/test/sortedLastIndexBy/sortedLastIndexBy.test.js +++ b/test/sortedLastIndexBy/sortedLastIndexBy.test.js @@ -5,9 +5,10 @@ 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'); //t.throws(sortedLastIndexBy(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/testlog b/test/testlog index 4fcedcdc1..038c55e6b 100644 --- a/test/testlog +++ b/test/testlog @@ -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