Skip to content

Commit c9a0b25

Browse files
committed
fix: add test for dedupe function to verify handling of duplicate elements
1 parent 7d531a4 commit c9a0b25

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎Sprint-1/implement/dedupe.test.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ test("given an empty array, it returns an empty array", () => {
2020
expect(dedupe([])).toEqual([]);
2121
});
2222

23+
test("returns a a copy with no duplicates", () => {
24+
expect(dedupe(["a", "a", "a", "b", "b", "c"])).toEqual(["a", "b", "c"]);
25+
});
26+
2327
// Given an array with no duplicates
2428
// When passed to the dedupe function
2529
// Then it should return a copy of the original array

0 commit comments

Comments
 (0)