London | 26-ITP-May | Jorvan White | Sprint 3 | Implement and Rewrite Tests - #1601
London | 26-ITP-May | Jorvan White | Sprint 3 | Implement and Rewrite Tests#1601JorvanW wants to merge 39 commits into
Conversation
| if (denominator === 0) { | ||
| return false; | ||
| } | ||
| if (numerator < denominator && numerator > 0) { |
There was a problem hiding this comment.
This if condition seems not quite right. Why (-2)/(-3) would return false?
| }); | ||
|
|
||
| // Case 6: Invalid angles | ||
| test(`should return "Invalid angle" when (angle < 0 || angle > 360)`, () => { |
There was a problem hiding this comment.
Besides -1 and 361, it should include the two boundary cases as well.
| }); | ||
|
|
||
| test(`should return false when both numerator and denominator are negative`, () => { | ||
| expect(isProperFraction(-1, -2)).toEqual(false); |
There was a problem hiding this comment.
there should be more negative number test cases. Can you think of them?
| // Invalid Cards | ||
| // test(`Cards without suits return as Invalid card`, () => { | ||
| // expect(getCardValue("10")).toEqual(new Error); | ||
| // }); | ||
| test('Cards without suits return as Invalid card', () => { | ||
| expect(() => { | ||
| getCardValue("10"); | ||
| }).toThrow("Invalid card"); | ||
| }); |
There was a problem hiding this comment.
there should be more invalid cases, Can you think of them?
hackertainment
left a comment
There was a problem hiding this comment.
Your functions are well written with clear logic and easy to read. Just need to improve on thinking test cases covering all possible scenarios. Good work, and keep it up :-)
|
Hello, is this completed or is there anything else I need to change. Many Thanks. |
|
I believed I have now managed to fix them. |

Self checklist
Changelist
Created Pull Request from Sprint 3 Task and updated for Pull Request