Skip to content

Commit 89c6ae8

Browse files
Add missing countChart test
1 parent 6366b00 commit 89c6ae8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎practice-tdd/count.test.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ test("should return 0 for an empty string", () => {
2626
const count = countChar("", "a");
2727
expect(count).toEqual(0);
2828
});
29+
30+
test("should return 0 when character does not occur", () => {
31+
const count = countChar("hello", "z");
32+
expect(count).toEqual(0);
33+
});
34+
2935
// Scenario: No Occurrences
3036
// Given the input string `str`,
3137
// And a character `char` that does not exist within `str`.

0 commit comments

Comments
 (0)