Skip to content

Commit 6916541

Browse files
Adding jest test case for case: handle count of 1
1 parent 64d94f8 commit 6916541

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sprint-3/2-practice-tdd/repeat-str.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ test("should repeat the string count times", () => {
2020
// Given a target string `str` and a `count` equal to 1,
2121
// When the repeatStr function is called with these inputs,
2222
// Then it should return the original `str` without repetition.
23-
23+
test("should return the original string when count is 1", () => {
24+
expect(repeatStr("hello", 1)).toEqual("hello");
25+
})
2426
// Case: Handle count of 0:
2527
// Given a target string `str` and a `count` equal to 0,
2628
// When the repeatStr function is called with these inputs,

0 commit comments

Comments
 (0)