Skip to content

Commit 005c578

Browse files
committed
Add a test for a case of an empty string input
1 parent aebac3e commit 005c578

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎practice-tdd/repeat-str.test.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ test("should repeat the string 0 times", () => {
4040
expect(repeatedStr).toEqual("");
4141
});
4242

43+
test("should repeat the string 0 times", () => {
44+
const str = "";
45+
const count = 0;
46+
const repeatedStr = repeatStr(str, count);
47+
expect(repeatedStr).toEqual("");
48+
});
49+
4350
// Case: Handle negative count:
4451
// Given a target string `str` and a negative integer `count`,
4552
// When the repeatStr function is called with these inputs,

0 commit comments

Comments
 (0)