Skip to content

Commit bed4644

Browse files
committed
update - count test when the string is empty - tdd
1 parent 94fd6c4 commit bed4644

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎practice-tdd/count.test.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ test("should return 0 when character doesn't occur", () => {
2626
const str = "salam";
2727
const char = "b";
2828

29+
const count = countChar(str, char);
30+
expect(count).toEqual(0);
31+
});
32+
test("should return 0 when the string is empty", () => {
33+
const str = "";
34+
const char = "b";
35+
2936
const count = countChar(str, char);
3037
expect(count).toEqual(0);
3138
});

0 commit comments

Comments
 (0)