From f0eded53b59599475eea842fed4e1b704b661f16 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Sun, 18 Feb 2018 19:45:24 +0200 Subject: [PATCH] Update stableSort.test.js --- test/stableSort/stableSort.test.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/stableSort/stableSort.test.js b/test/stableSort/stableSort.test.js index 28dcbb057..e8cf95496 100644 --- a/test/stableSort/stableSort.test.js +++ b/test/stableSort/stableSort.test.js @@ -10,12 +10,8 @@ test('Testing stableSort', (t) => { //t.false(stableSort(args..), 'Expected'); //t.throws(stableSort(args..), 'Expected'); - const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + const arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; const compare = () => 0; - // stable - t.deepEqual(stableSort(arr, compare), arr); - // unstable - t.notDeepEqual([...arr].sort(compare), arr); - + t.deepEqual(stableSort(arr, compare), arr, 'Array is properly sorted'); t.end(); -}); \ No newline at end of file +});