London | 25-ITP-May | Tomislav Dukez | Sprint 3 | Implement and Rewrite Tests - #1437
London | 25-ITP-May | Tomislav Dukez | Sprint 3 | Implement and Rewrite Tests#1437tomdu3 wants to merge 12 commits into
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work. One comment about your fractions testing, though
tomdu3
left a comment
There was a problem hiding this comment.
@LonMcGregor, Of course I've missed that, and naturally - there's a bug. So, I fixed the issue with calculation and added tests with negative numbers.
Awesome review. Thanks.
|
|
||
| function isProperFraction(numerator, denominator) { | ||
| // TODO: Implement this function | ||
| if (denominator === 0 || Math.abs(numerator / denominator) > 1) { |
There was a problem hiding this comment.
Great work, your test cases for fractions are more expansive now.
My next question is about this if conditional. You are checking something which is a boolean, then returning true/false based on that condition. Can you spot any way you could simplify this code?
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work fixing this. returning a boolean from an if condition is a common mistake, but it's also pretty easy to fix, so look out for things like this!
|
Closing PR because the May ITP run has finished. Feel free to re-open if you're still working on it. |
Learners, PR Template
Self checklist
Changelist
Added tasks from the Sprint 3, Implement and Rewrite Tests: