Skip to content

Commit de7f533

Browse files
committed
Add a test for countChar
1 parent b31a586 commit de7f533

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ test("should count multiple occurrences of a character", () => {
2222
// And a character `char` that does not exist within `str`.
2323
// When the function is called with these inputs,
2424
// Then it should return 0, indicating that no occurrences of `char` were found.
25+
test("should not find any occurrences", () => {
26+
const str = "aaaaaaaa";
27+
const char = "something";
28+
29+
const count = countChar(str, char);
30+
expect(count).toEqual(0);
31+
});

0 commit comments

Comments
 (0)