Skip to content

Commit aebac3e

Browse files
committed
Add a more specific test for multiple occurences of a character
1 parent 93fb568 commit aebac3e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎practice-tdd/count.test.js‎

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

20+
test("should count multiple occurences of a character in a multiple character string", () => {
21+
const str = "banana";
22+
const char = "a";
23+
const count = countChar(str, char);
24+
expect(count).toEqual(3);
25+
});
26+
2027
// Scenario: No Occurrences
2128
// Given the input string `str`,
2229
// And a character `char` that does not exist within `str`.

0 commit comments

Comments
 (0)