Glasgow | Jan-26 | Elisabeth Matulian | Sprint 3 | Coursework practice tdd#1005
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| const count = countChar(str, char); | ||
| expect(count).toEqual(5); | ||
| }); | ||
| test("No Occurrences", () => { |
There was a problem hiding this comment.
Functionality-wise, the test is correct. But it is a tiny bit misplaced in the file, and the name could be a bit more descriptive, based on other tests in this file. Can you try to update it?
There was a problem hiding this comment.
the peace of code is moved, name is updated
| function repeatStr() { | ||
| return "hellohellohello"; | ||
| function repeatStr(str, count) { | ||
| if (count >= 0) {return str.repeat(count)} |
There was a problem hiding this comment.
One little thing, for readability purposes, it's worth putting return and throw on their own lines with braces.
There was a problem hiding this comment.
Thanks for mentioning, I have changed the position on the line
There was a problem hiding this comment.
Functionality-wise, the tests are correct, but it's going to be hard to distinguish which one fails, given that they are all named the same. How can we improve that?
There was a problem hiding this comment.
That's true! Didn't think about that. Names's updated:)
Could you please take another look when you have a moment?
Learners, PR Template
Self checklist
Changelist
Completed Coursework practice tdd tasks
Questions
No questions