diff --git a/specs/radix-sort/radix-sort.solution.test.js b/specs/radix-sort/radix-sort.solution.test.js index 0f81f0d8..0bd9feab 100644 --- a/specs/radix-sort/radix-sort.solution.test.js +++ b/specs/radix-sort/radix-sort.solution.test.js @@ -104,7 +104,7 @@ describe("radix sort", function () { const nums = new Array(fill) .fill() .map(() => Math.floor(Math.random() * 500000)); - const ans = radixSort(nums); - expect(ans).toEqual(nums.sort()); + const ans = radixSort([...nums]); + expect(ans).toEqual([...nums].sort((a, b) => a - b)); }); }); diff --git a/specs/radix-sort/radix-sort.test.js b/specs/radix-sort/radix-sort.test.js index b32ae006..396c5882 100644 --- a/specs/radix-sort/radix-sort.test.js +++ b/specs/radix-sort/radix-sort.test.js @@ -70,7 +70,7 @@ describe.skip("radix sort", function () { const nums = new Array(fill) .fill() .map(() => Math.floor(Math.random() * 500000)); - const ans = radixSort(nums); - expect(ans).toEqual(nums.sort()); + const ans = radixSort([...nums]); + expect(ans).toEqual([...nums].sort((a, b) => a - b)); }); });