Conversation
|
|
||
| // ...AND THIS COMMENT LINE! | ||
|
|
||
| if (score < 0 || score > 100) { |
There was a problem hiding this comment.
The solution seems to be ok but I still would suggest digesting the functions of Math, especially the Math.ceil()
There was a problem hiding this comment.
Solution was reworked using Math.ceil() and Math.max() functions.
| if (n >= 0) { | ||
|
|
||
| // ...AND THIS COMMENT LINE! | ||
| if (n < 2) { |
There was a problem hiding this comment.
Could you please remove the unnecessary, empty lines?
There was a problem hiding this comment.
Unnecessary empty lines were removed.
module-2/test/calc.spec.js
Outdated
| const c = calc(5); | ||
| //When | ||
| //Then | ||
| expect(() => c.divide(0)).to.throw("Division"); |
There was a problem hiding this comment.
I think you can check the exact error message as it is a static one. "Division by 0 is not possible!"
There was a problem hiding this comment.
Checking of exact error message was implemented.
module-2/test/calc.spec.js
Outdated
| const c = calc(-3); | ||
| //When | ||
| //Then | ||
| expect(() => c.sqrt()).to.throw("Square"); |
There was a problem hiding this comment.
Could you please dig into the source and check if the validation of the exact message is possible?
There was a problem hiding this comment.
Checking of exact error message was implemented.
module-2/test/calc.spec.js
Outdated
| }); | ||
|
|
||
| }); | ||
|
|
There was a problem hiding this comment.
Could you please remove the unnecessary empty lines?
There was a problem hiding this comment.
Unnecessary empty lines were removed.
…le-2/test/calc-spec.js based on Sandor Orosz's comments
Please review my solution for Module-1 task:
Please review my solution for Module-2 task: