Skip to content

Commit 6ee1609

Browse files
authored
Add test for case-sensitive character counting
1 parent 2cdf11c commit 6ee1609

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Sprint-3/2-practice-tdd/count.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ test("should count multiple occurrences of a character", () => {
1717
expect(count).toEqual(5);
1818
});
1919

20+
test("counts single character occurrences (case sensitive)", () => {
21+
expect(countChar("aAaA", "a")).toEqual(2);
22+
expect(countChar("aAaA", "A")).toEqual(2);
23+
expect(countChar("hello", "l")).toEqual(2);
24+
});
25+
2026
// Scenario: No Occurrences
2127
// Given the input string `str`,
2228
// And a character `char` that does not exist within `str`.

0 commit comments

Comments
 (0)