Skip to content

Commit c4b0c07

Browse files
rename repeat function to make its purpose more clear
1 parent 8f3d6cf commit c4b0c07

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Sprint-3/2-practice-tdd/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ Write the tests _before_ the code that will make them pass.
99
Recommended order:
1010

1111
1. `count.test.js`
12-
1. `repeat.test.js`
12+
1. `repeat-str.test.js`
1313
1. `get-ordinal-number.test.js`
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function repeatStr() {
2+
return "hellohellohello";
3+
}
4+
5+
module.exports = repeatStr;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Implement a function repeat
2-
const repeat = require("./repeat");
2+
const repeatStr = require("./repeat-str");
33
// Given a target string str and a positive integer count,
44
// When the repeat function is called with these inputs,
55
// Then it should:
@@ -12,7 +12,7 @@ const repeat = require("./repeat");
1212
test("should repeat the string count times", () => {
1313
const str = "hello";
1414
const count = 3;
15-
const repeatedStr = repeat(str, count);
15+
const repeatedStr = repeatStr(str, count);
1616
expect(repeatedStr).toEqual("hellohellohello");
1717
});
1818

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

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)