Repository navigation
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
Test cases are very comprehensive.
Code looks good.
Just one question.
| test.each([ | ||
| [1, 2, true], | ||
| [9, 10, true], | ||
| [2, 1, false], | ||
| [3, 3, false], | ||
| [10, 2, false], | ||
| [0, 5, true], | ||
| [-1, 2, true], | ||
| [1, -2, true], | ||
| [-3, -2, false], | ||
| [0, 0, false], | ||
| [1, 0, false], |
There was a problem hiding this comment.
These test cases are quite comprehensive because they almost cover all possible combinations of numerator and denominator.
Could you think of one more test case to make them more complete?
There was a problem hiding this comment.
Thanks for the review! I've added three more test cases covering the sign combinations that were missing: [-1, -2, true] (both negative, proper), [-3, 2, false] (negative numerator, improper) and [3, -2, false] (negative denominator, improper). I added the same cases to the node-test file so the two suites stay consistent. All tests pass. Please take another look when you have time
2763c86 to
52fef2a
Compare
Self checklist
Task code
CYF-1059
Changelist
Implemented all three sprint exercises and completed their tests using both node:test and Jest.