Skip to content

Commit 6e8bd15

Browse files
committed
add test case for repeating string one time
1 parent 9d9553e commit 6e8bd15

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
@@ -21,6 +21,13 @@ test("should repeat the string count times", () => {
2121
// When the repeatStr function is called with these inputs,
2222
// Then it should return the original `str` without repetition.
2323

24+
test("should repeat the string one time", () => {
25+
const str = "hello";
26+
const count = 1;
27+
const repeatedStr = repeatStr(str, count);
28+
expect(repeatedStr).toEqual("hello");
29+
});
30+
2431
// Case: Handle count of 0:
2532
// Given a target string `str` and a `count` equal to 0,
2633
// When the repeatStr function is called with these inputs,

0 commit comments

Comments
 (0)