From 18f5dbd41c40cf67d20848e7d710a5e3be562ae0 Mon Sep 17 00:00:00 2001 From: davidftaylor Date: Mon, 19 Jul 2021 19:37:37 -0400 Subject: [PATCH] initial commit --- package.json | 9 +++++---- specs/radix-sort/radix-sort.test.js | 7 ++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d53b0789..58b9ebcf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "algorithms-exercises", + "name": "fix-radix-sort-test", "version": "1.0.0", - "description": "The exercises for the Complete Intro to Algorithms", + "description": "", "main": "index.html", "scripts": { "start": "parcel index.html", @@ -23,5 +23,6 @@ }, "resolutions": { "@babel/preset-env": "7.13.8" - } -} + }, + "keywords": [] +} \ No newline at end of file diff --git a/specs/radix-sort/radix-sort.test.js b/specs/radix-sort/radix-sort.test.js index b32ae006..f573e57b 100644 --- a/specs/radix-sort/radix-sort.test.js +++ b/specs/radix-sort/radix-sort.test.js @@ -71,6 +71,11 @@ describe.skip("radix sort", function () { .fill() .map(() => Math.floor(Math.random() * 500000)); const ans = radixSort(nums); - expect(ans).toEqual(nums.sort()); + expect(ans).toEqual( + nums.sort((a, b) => { + if (a < b) return -1; + return 1; + }) + ); }); });