You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9733fa3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: Sprint-3/2-practice-tdd/count.test.js
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,3 +22,13 @@ test("should count multiple occurrences of a character", () => {
22
22
// And a character `char` that does not exist within `str`.
23
23
// When the function is called with these inputs,
24
24
// Then it should return 0, indicating that no occurrences of `char` were found.
25
+
26
+
// to solve this issue, we will implement a test case that checks for the scenario where the character is not found in the string.
27
+
// The test will call the countChar function with a string and a character that does not exist in that string, and it will assert that the returned count is 0.
28
+
// here is the code for the test case:
29
+
test("should return 0 when character is not found",()=>{
0 commit comments