Skip to content

Commit ebfb090

Browse files
made descriptions more informative
1 parent 7604204 commit ebfb090

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

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

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ const repeatStr = require("./repeat-str");
55
// Then it should:
66

77
// Case: handle multiple repetitions:
8-
// Given a target string `str` and a positive integer `count` greater than 1,
9-
// When the repeatStr function is called with these inputs,
10-
// Then it should return a string that contains the original `str` repeated `count` times.
8+
// A string is repeated count number of times
9+
// If a string is "hello" and count is 3 then
10+
// the hello will be output 3 times with no spaces between
1111

1212
test("should repeat the string count times", () => {
1313
const str = "hello";
@@ -17,9 +17,9 @@ test("should repeat the string count times", () => {
1717
});
1818

1919
// Case: handle count of 1:
20-
// Given a target string `str` and a `count` equal to 1,
21-
// When the repeatStr function is called with these inputs,
22-
// Then it should return the original `str` without repetition.
20+
// If count is 1 then the string is not repeated and
21+
// will be output for example if the string is "Hello"
22+
// then the output will be "Hello"
2323

2424
test("should repeat the string count times", () => {
2525
const str = "hello";
@@ -29,9 +29,8 @@ test("should repeat the string count times", () => {
2929
});
3030

3131
// Case: Handle count of 0:
32-
// Given a target string `str` and a `count` equal to 0,
33-
// When the repeatStr function is called with these inputs
34-
// Then it should return an empty string.
32+
// If the the string is empty then count will be 0
33+
// and an empty string will be returned
3534

3635
test("should repeat the string count times", () => {
3736
const str = "hello";

0 commit comments

Comments
 (0)