@@ -30,7 +30,6 @@ test("should return 0 if there are no occurrences of a character", () => {
3030 expect ( count ) . toEqual ( 0 ) ;
3131} ) ;
3232
33-
3433// Scenario 3: Single Occurrence
3534// Given the input string `str`,
3635// And a character `char` that exists only once within `str`.
@@ -70,15 +69,15 @@ test("should return multiple occurrences of empty spaces in the string", () => {
7069 expect ( count ) . toEqual ( 10 ) ;
7170} ) ;
7271
73-
7472// Scenario 6: No occurrences if the char is just an empty char
7573// Given the input string `str` that contains any number of characters or no characters at all,
7674// And a character `char` which is empty ''.
7775// When the function is called with these inputs,
7876// Then it should return 0 as there is nothing to count as the char is just empty.
7977
8078test ( "should return 0 as the char is just empty" , ( ) => {
81- const str = "Hi I am a string that can be empty or not empty but I can't count empty characters." ;
79+ const str =
80+ "Hi I am a string that can be empty or not empty but I can't count empty characters." ;
8281 const char = "" ;
8382 const count = countChar ( str , char ) ;
8483 expect ( count ) . toEqual ( 0 ) ;
@@ -95,4 +94,4 @@ test("should count multiple occurrences of a character", () => {
9594 const char = "a" ;
9695 const count = countChar ( str , char ) ;
9796 expect ( count ) . toEqual ( 4 ) ;
98- } ) ;
97+ } ) ;
0 commit comments