diff --git a/test/binarySearch/binarySearch.test.js b/test/binarySearch/binarySearch.test.js index e408ca3d1..e1a53283d 100644 --- a/test/binarySearch/binarySearch.test.js +++ b/test/binarySearch/binarySearch.test.js @@ -9,6 +9,7 @@ test('Testing binarySearch', (t) => { t.equal(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 6), 2, 'Finds item in array'); t.equal(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 21), -1, 'Returns -1 when not found'); t.equal(binarySearch([], 21), -1, 'Works with empty arrays'); + t.equal(binarySearch([1], 1), 0, "Works for one element arrays"); //t.false(binarySearch(args..), 'Expected'); //t.throws(binarySearch(args..), 'Expected'); t.end();