From b4d8d9825b726a7440b612cad88d046604becc0a Mon Sep 17 00:00:00 2001 From: Brian Feister <47546998+bfeister@users.noreply.github.com> Date: Tue, 28 Jun 2022 16:39:54 -0600 Subject: [PATCH] Add Array.sort() comparator function (Chrome 103) --- specs/radix-sort/radix-sort.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/radix-sort/radix-sort.test.js b/specs/radix-sort/radix-sort.test.js index b32ae006..27d63d1b 100644 --- a/specs/radix-sort/radix-sort.test.js +++ b/specs/radix-sort/radix-sort.test.js @@ -71,6 +71,6 @@ 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) => a - b)); }); });