Repository navigation
London | 26-ITP-Sep | Mars Adesina | Sprint 2 | Implement and rewrite tests - #1718
Open
marscancode wants to merge 24 commits into
Open
marscancode wants to merge 24 commits into
marscancode wants to merge 24 commits into
Conversation
cjyuan
reviewed
Oct 23, 2026
Comment on lines
+17
to
+21
| if(numerator < denominator){ | ||
| return true; | ||
| } else{ | ||
| return false; | ||
| } |
Contributor
There was a problem hiding this comment.
Format (spacing) not fully consistent. Why not use a formatter to keep the code consistently format?
| @@ -1,3 +1,3 @@ | |||
| import { isProperFraction } from "../implement/2-is-proper-fraction.js"; | |||
|
|
|||
| // TODO: Write tests in Jest syntax to cover all combinations of positives, negatives, zeros, and other categories. | |||
Contributor
There was a problem hiding this comment.
The test cases in this script do not yet include cases involving negative numbers.
Are
| test("Arbitrary non-card string", () => { | ||
| expect(() => getCardValue("invalid")).toThrow( | ||
| /Expected a valid number followed by a suit, but got "invalid"/ | ||
| ); |
Contributor
There was a problem hiding this comment.
Why test the error message as
expect(() => getCardValue("invalid")).toThrow(
/Expected a valid number followed by a suit, but got "invalid"/
);instead of as
expect(() => getCardValue("invalid")).toThrow(
'Expected a valid number followed by a suit, but got "invalid"'
);?
Contributor
There was a problem hiding this comment.
Tests are very comprehensive. Excellent job.
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
Task code
CYF-1059
Changelist
I implemented the three functions:
I also created tests in Node and Jest for all three functions.