Repository navigation
Cape Town | 26-ITP-Sept | Leigh Ross | Sprint 2 | Implement and rewrite tests - #1683
Open
leigh-ross wants to merge 4 commits into
Open
leigh-ross wants to merge 4 commits into
leigh-ross wants to merge 4 commits into
Conversation
Liam310
reviewed
Oct 12, 2026
| assert.equal(angleValue, "Straight angle"); | ||
| }); | ||
|
|
||
| describe ("Acute angles and boundaries", () => { |
Contributor
There was a problem hiding this comment.
Nice use of describe to group related tests!
Liam310
reviewed
Oct 12, 2026
|
|
||
| export function isProperFraction(numerator, denominator) { | ||
| // TODO: Implement this function | ||
| return (numerator >= 0) && numerator < denominator |
Contributor
There was a problem hiding this comment.
I don't think we want to restrict proper fractions to be only the positive ones.
How can we deal with this in the solution?
Note: make sure there is adequate test coverage for this case also.
Liam310
reviewed
Oct 12, 2026
Comment on lines
+63
to
+66
| describe ("Negative numerator", () => { | ||
| test("-98/100", () => { | ||
| assert.equal(isProperFraction(-98, 100), false); | ||
| }); |
Contributor
There was a problem hiding this comment.
Refer to other comment - make sure we update our test suite to account for the corrected understanding of whether negative fractions can be proper.
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
Added 3 functions:
Added node tests for each Function.
Rewrote node tests for jest.