We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0d9240 commit f6314c3Copy full SHA for f6314c3
Sprint-3/2-practice-tdd/repeat.js
@@ -1,6 +1,6 @@
1
function repeat(str, count) {
2
if(count < 0) {
3
- return "Error: Negative counts are not valid.";
+ return false;
4
}
5
return str.repeat(count);
6
Sprint-3/2-practice-tdd/repeat.test.js
@@ -46,5 +46,5 @@ test("should repeat the string 0 times ( means the output will be an empty strin
46
const str = "hello";
47
const count = -3;
48
const repeatedStr = repeat(str, count);
49
- expect(repeatedStr).toEqual("Error: Negative counts are not valid.");
+ expect(repeatedStr).toEqual(false);
50
});
0 commit comments