Skip to content

Commit 0c2366b

Browse files
wrote a test check for non- alphabet character
1 parent 7d02e38 commit 0c2366b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ test("should be case-sensitive when matching characters", () => {
3636
expect(countChar("AaA", "A")).toEqual(2); // uppercase A occurrences
3737
expect(countChar("AaA", "a")).toEqual(1); // lowercase a occurrences
3838
});
39+
40+
// New: non-alphabet characters
41+
test("should count non-alphabet characters", () => {
42+
expect(countChar("1231", "1")).toEqual(2);
43+
expect(countChar("!?!?", "!")).toEqual(2);
44+
});

0 commit comments

Comments
 (0)