Skip to content

Commit bf5f7f8

Browse files
committed
Match the error message in toThrow() matcher function.
1 parent 3415822 commit bf5f7f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sprint-3/3-mandatory-practice/implement/repeat.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const repeat = require("./repeat");
1111

1212
test("should repeat string correctly for various valid counts", () => {
1313
const testCases = [
14-
{ str: "hello", count: 1, expected: "hellohello" },
14+
{ str: "hello", count: 1, expected: "hello" },
1515
{ str: "hello", count: 0, expected: "" },
1616
];
1717

@@ -30,7 +30,7 @@ test("should repeat string correctly for various valid counts", () => {
3030

3131
test("should throw error when count is negative", () => {
3232
expect(() => repeat("hello", -2)).toThrow(
33-
"Repeat count must be non-negative"
33+
"Times must be a non-negative integer"
3434
);
3535
});
3636

0 commit comments

Comments
 (0)