London | 26-ITP-May | Raihan Sharif | Sprint 3 | Implement and rewrite#1304
Open
RaihanSharif wants to merge 5 commits into
Open
London | 26-ITP-May | Raihan Sharif | Sprint 3 | Implement and rewrite#1304RaihanSharif wants to merge 5 commits into
RaihanSharif wants to merge 5 commits into
Conversation
cjyuan
reviewed
May 11, 2026
| const suit = ["♠", "♥", "♦", "♣"]; | ||
|
|
||
| const cardValue = card.slice(0, -1); | ||
| const cardSuit = card[card.length - 1]; |
Comment on lines
+37
to
42
| test(`should return "Reflex angle" when (180 < angle < 361)`, () => { | ||
| // Test various acute angles, including boundary cases | ||
| expect(getAngleType(179)).not.toEqual("Reflex angle"); | ||
| expect(getAngleType(371)).not.toEqual("Reflex angle"); | ||
| expect(getAngleType(200)).toEqual("Reflex angle"); | ||
| }); |
Contributor
There was a problem hiding this comment.
-
360 is not a reflex angle.
-
Why not introduce a category to test invalid angles, especially the boundary cases?
Comment on lines
+30
to
+36
| test(`should return true when numerator and denominator both negative and numerator < denominator`, () => { | ||
| expect(isProperFraction(-3, -2)).toEqual(true); | ||
| }); | ||
|
|
||
| test(`should return true when numerator is negative and numerator < denominator`, () => { | ||
| expect(isProperFraction(-3, 2)).toEqual(true); | ||
| }); |
Contributor
There was a problem hiding this comment.
-
I don't think your function can pass these tests?
-
You can use pseudo-code and notations like
abs(...)or| ... |in the descriptions to more
concisely describe the conditions (the "when" part).
Comment on lines
+38
to
+39
| assertEquals(isProperFraction(-5, 4), true); | ||
| assertEquals(isProperFraction(-4, -5), false); |
Contributor
There was a problem hiding this comment.
Can your function pass these tests?
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
Completed as per spec.