Commit 4c99807
committed
Test: add repeat.test.js to verify repeat function
- Added tests for repeat() covering:
• repeating a string multiple times
• returning empty string when count is 0
• throwing error when count is negative
- Cleaned up unused code to follow best practices1 parent cbb4e8d commit 4c99807
1 file changed
+18
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments