From c2edf62a5fa53f635b98f4e3e519edd98f5b8858 Mon Sep 17 00:00:00 2001 From: Oscar Shrimpton Date: Tue, 30 Jan 2018 19:12:58 +0000 Subject: [PATCH] Add description to binarySearch() test --- test/binarySearch/binarySearch.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/binarySearch/binarySearch.test.js b/test/binarySearch/binarySearch.test.js index c1ed00043..cd7d7c2ed 100644 --- a/test/binarySearch/binarySearch.test.js +++ b/test/binarySearch/binarySearch.test.js @@ -6,8 +6,8 @@ test('Testing binarySearch', (t) => { //Please go to https://github.com/substack/tape t.true(typeof binarySearch === 'function', 'binarySearch is a Function'); //t.deepEqual(binarySearch(args..), 'Expected'); - t.equal(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 6), 2); - t.equal(binarySearch([1, 4, 6, 7, 12, 13, 15, 18, 19, 20, 22, 24], 21), -1); + 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.false(binarySearch(args..), 'Expected'); //t.throws(binarySearch(args..), 'Expected'); t.end();