Birmingham | ITP-Jan-26 | Ayodeji Ayorinde | Sprint 3| 1-implement-and-rewrite-tests#1215
Closed
Ayogit1 wants to merge 21 commits intoCodeYourFuture:mainfrom
Closed
Birmingham | ITP-Jan-26 | Ayodeji Ayorinde | Sprint 3| 1-implement-and-rewrite-tests#1215Ayogit1 wants to merge 21 commits intoCodeYourFuture:mainfrom
Ayogit1 wants to merge 21 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
cjyuan
reviewed
Mar 18, 2026
Comment on lines
+41
to
+44
| test(`should return "Invalid angle" when (angle > 360)`, () => { | ||
| // Test various acute angles, including boundary cases | ||
| expect(getAngleType(90)).toEqual("Invalid angle"); | ||
| }); No newline at end of file |
Contributor
There was a problem hiding this comment.
-
The condition about invalid angle is not quite correct.
-
Can your function pass this test?
Comment on lines
+14
to
+21
| test(`should return false when denominator is zero`, () => { | ||
| expect(isProperFraction(1, 7)).toEqual(false); | ||
| }); | ||
|
|
||
| // Special case: negatives | ||
| test(`should return false when denominator is zero`, () => { | ||
| expect(isProperFraction(1, -7)).toEqual(false); | ||
| }); |
Contributor
There was a problem hiding this comment.
The description of the tests do not match the tests being carried out.
| // Number Cards (2-10) | ||
|
|
||
| test("Should return 2–10 for their respective card values", () => { | ||
| const cards = ["2", "3", "4", "5", "6", "7", "8", "9", "10"]; |
Contributor
There was a problem hiding this comment.
A valid card should also have a valid suit character.
For example, "2♥". "2" should be considered an invalid card.
| expect(getCardValue(card)).toEqual(Number("Invalid")); | ||
|
|
||
| }); | ||
| }); |
Contributor
There was a problem hiding this comment.
-
Test descriptions do not match the tests being carried out.
-
The function is expected to throw an error when the given card is invalid.
- Suggestion: Lookup how to throw error in JS, and follow the links line 44 to find out how to check if a function can throw an errors as expected in Jest.
Comment on lines
+15
to
+19
| if (numerator < denominator) { | ||
| return "true"; | ||
| } else { | ||
| return "false"; | ||
| } |
Contributor
There was a problem hiding this comment.
Can you lookup if -1/-2, 1/-2, -1/2, -1/0 are considered proper fractions, and then update
your implementation and tests accordingly?
Open
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Completion of 1-implement-and-rewrite-tests tasks