Skip to content

Commit 518313e

Browse files
committed
2-practice-tdd count.test.js completed
1 parent 3372770 commit 518313e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,18 @@ 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 return 0, indicating that no occurrences of `b` were found", () => {
26+
const str = "venue";
27+
const char = "b";
28+
const count = countChar(str, char);
29+
expect(count).toEqual(0);
30+
});
31+
32+
test("should return 0, indicating that no occurrences of `w` were found", () => {
33+
const str = "";
34+
const char = "x";
35+
const count = countChar(str, char);
36+
expect(count).toEqual(0);
37+
});
38+
39+

0 commit comments

Comments
 (0)