Skip to content

Commit ee47d72

Browse files
committed
added two taste cases for unordered number and character,both test passed
1 parent 57a5cc3 commit ee47d72

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,14 @@ test("when passed an array of duplicate characters", () => {
4646
expect(dedupe(["a", "a", "b", "b", "b", "c"])).toEqual(["a", "b", "c"]);
4747
expect(dedupe(["c", "c", "e", "e", "z", "z"])).toEqual(["c", "e", "z"]);
4848
});
49+
test("when passed an array of duplicate unordered numbers ", () => {
50+
expect(dedupe([5, 1, 1, 2, 3, 2, 5, 8])).toEqual([5, 1, 2, 3, 8]);
51+
});
52+
test("when passed an array of duplicate unordered characters ", () => {
53+
expect(dedupe(["f", "a", "a", "k", "k", "c", "c"])).toEqual([
54+
"f",
55+
"a",
56+
"k",
57+
"c",
58+
]);
59+
});

0 commit comments

Comments
 (0)