We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
.sort()
1 parent ca2eee9 commit 2f0b347Copy full SHA for 2f0b347
16_permutations/solution/permutations-solution.spec.js
@@ -2,10 +2,10 @@ const permutations = require("./permutations-solution");
2
3
describe("permutations", () => {
4
test("1 possible permutation for a set containing 0 numbers", () => {
5
- expect(permutations([]).sort()).toEqual([[]].sort());
+ expect(permutations([])).toEqual([[]]);
6
});
7
test("1 possible permutation for a set containing 1 number", () => {
8
- expect(permutations([1]).sort()).toEqual([[1]].sort());
+ expect(permutations([1])).toEqual([[1]]);
9
10
test("2 possible permutations for a set containing 2 numbers", () => {
11
expect(permutations([1, 2]).sort()).toEqual(
0 commit comments