Skip to content

Commit 457ca65

Browse files
committed
Fix: Compare result against hardcoded value in dedupe copy test
1 parent faa0f40 commit 457ca65

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Sprint-1/implement/dedupe.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,10 @@ test("given an empty array, it returns an empty array", () => {
2626
test("given an array with no duplicates, it returns a copy of the original array", () => {
2727
const input = [1, 2, 3];
2828
const result = dedupe(input);
29-
// Check the contents are the same
30-
expect(result).toEqual(input);
29+
// Check the contents match a hardcoded expected value, not the input itself
30+
expect(result).toEqual([1, 2, 3]);
3131
// Check it's a different array, not the same reference
3232
expect(result).not.toBe(input);
33-
// Check that a duplicate input is correctly deduped in the result
34-
expect(dedupe([1, 1, 2, 3])).toEqual([1, 2, 3]);
3533
});
3634

3735
// Given an array with strings or numbers

0 commit comments

Comments
 (0)