Skip to content

Commit faa0f40

Browse files
committed
Fix: Strengthen dedupe copy test with duplicate input check
1 parent 7dcc6d3 commit faa0f40

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sprint-1/implement/dedupe.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ test("given an array with no duplicates, it returns a copy of the original array
3030
expect(result).toEqual(input);
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]);
3335
});
3436

3537
// Given an array with strings or numbers

0 commit comments

Comments
 (0)