We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 670ac51 commit 844e904Copy full SHA for 844e904
Sprint-3/2-practice-tdd/count.test.js
@@ -22,3 +22,17 @@ test("should count multiple occurrences of a character", () => {
22
// And a character `char` that does not exist within `str`.
23
// When the function is called with these inputs,
24
// Then it should return 0, indicating that no occurrences of `char` were found.
25
+
26
+test("should return 0 if the character does not exist in the string", () => {
27
+ const str = "hello";
28
+ const char = "z";
29
+ const count = countChar(str, char);
30
+ expect(count).toEqual(0);
31
+});
32
33
34
35
36
37
38
0 commit comments