Skip to content

Commit b17fb0c

Browse files
fix: improve test description for negative count error
1 parent 869c92a commit b17fb0c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ test("should return empty string", ()=>{
2525
expect(repeatStr(str, count)).toEqual("");
2626

2727
});
28-
test("should throw negative counts are not valid Error", ()=>{
29-
const str = "hello";
28+
test("should throw an error when count is negative", () => {
29+
const str = "hello";
3030
const count = -1;
31-
expect(()=> repeatStr(str, count)).toThrow();
31+
expect(() => repeatStr(str, count)).toThrow();
3232
});
3333

3434
// Case: handle count of 1:

0 commit comments

Comments
 (0)