Birmingham | ITP-Jan-26 | Ayodeji Ayorinde | Sprint 3| 1-implement-and-rewrite-tests -Final#1289
Conversation
|
@LonMcGregor , Please what is wrong with this PR? I couldn't see any comments from you. |
|
Your previous Sprint-3 "Implement and Rewrite" PR already had a review. Please include the link of that PR here and describe how you addressed the comments. |
|
Not sure if you were referring to the PR below. |
|
These are all your PRs (closed and open) you created in the Structuring and Testing Data module: Those that has been reviewed have the the "Reviewed" or "Complete" labels. |
|
This PR is a continuation of the PR that has already had a review. |
|
Would be helpful to share the link of that PR here. |
|
Link added: |
| const num = Number(rank); | ||
| if (num >= 2 && num <= 10) { | ||
| return num; | ||
| } |
There was a problem hiding this comment.
Still have the same issue.
In JavaScript, strings that represent valid numeric literals in the language can be safely converted to equivalent numbers. For examples, "0x02", "2.1", or "0002".
Does your function return the value you expected from each of the following function calls?
getCardValue("0x02♠");
getCardValue("2.1♠");
getCardValue("0002♠");
| }); | ||
|
|
||
| // Case 6: Invalid angles | ||
| test('should return "Invalid angle" for values out of range', () => { |
There was a problem hiding this comment.
- Would be clearer to specify exactly what values are considered "out of range".
| expect(getAngleType(0)).toBe("Invalid angle"); | ||
| expect(getAngleType(-10)).toBe("Invalid angle"); | ||
| expect(getAngleType(361)).toBe("Invalid angle"); |
There was a problem hiding this comment.
Why not test both boundary cases?
Learners, PR Template
Self checklist
Changelist
1-implement-and-rewrite-tests -Final