Repository navigation
Conversation
hackertainment
left a comment
There was a problem hiding this comment.
Thank you for your coursework. Please keep it up.
| test("Classifies for angles outside the valid range.", () => { | ||
| const invalid = getAngleType(361); | ||
| assert.equal(invalid, "Invalid angle"); | ||
| }); |
There was a problem hiding this comment.
There should be two boundary case for angles outside the valid range. Can you think of them? Please add them into this test suite. Thank you.
There was a problem hiding this comment.
Good coverage of test cases. Well done!
There was a problem hiding this comment.
I don't think this program runs correctly for positives, negatives, and zeros. Can you fix it? Thank you.
There was a problem hiding this comment.
The test cases should also include negatives and zeros. Please add them back. Thank you.
| test(`should return false when numerator is (-)`, () => { | ||
| expect(isProperFraction(-1, 0)).toEqual(true); | ||
| }); |
There was a problem hiding this comment.
The description does not match the expected output. Which one is correct?
There was a problem hiding this comment.
There should be more test cases covering different combination of positive and negative values. Please add them back. Thank you.
There was a problem hiding this comment.
I am not quite sure about the correctness of this program. Please fix the following issues:
- formatting (e.g. indentation, brackets, etc)
- making
ifandelse ifcleaner to read, covering all possible combinations (instead of hardcode specific values) - try to store
card.slice(0, -1)into a variable and reuse it (instead of slice it multiple times)
If you find it difficult to approach this problem, try to book a mentored coding session and work this out with a volunteer together.
Self checklist
Task code
CYF-1059
Changelist
Completed the implementation and rewrote the tests using node:test and jest.