London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 3 | Implement and Rewrite Tests - #1440
London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 3 | Implement and Rewrite Tests #1440khaliun-dev wants to merge 10 commits into
Conversation
Implemented the getAngleType function to classify angles and added tests for various angle types.
Added additional tests for angle types including acute, right, obtuse, straight, reflex, and invalid angles.
Implemented the isProperFraction function and added tests for various cases.
Implemented the getCardValue function to return the value of a card based on its rank and suit. Added assertions to test valid card values and handle errors for invalid cards.
Added additional test cases for invalid card values to ensure proper error handling.
Added comprehensive Jest tests for the isProperFraction function, covering special cases, positive and negative proper and improper fractions.
Updated test cases for getCardValue function to use Jest syntax, covering all card types including Aces, number cards, face cards, and invalid cards.
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start, but still some things to work on
| } | ||
| const suits = ["♠", "♥", "♦", "♣"]; | ||
|
|
||
| const values = { |
There was a problem hiding this comment.
This is an interesting approach, good idea
| const isProperFraction = require("../implement/2-is-proper-fraction"); | ||
|
|
||
| // TODO: Write tests in Jest syntax to cover all combinations of positives, negatives, zeros, and other categories. | ||
| // Special case: denominator is zero |
There was a problem hiding this comment.
Be careful here in your tests - have you tried running them with npm test? Can you see what is missing?
Updated the isProperFraction function to handle negative values correctly and added additional test cases for comprehensive coverage.
|
You have some new test cases which is good, but when I run |
|
@LonMcGregor hiya, i think i have managed to do it properly, finally! Can you please have a quick looksy? |
|
Great, yes, the exports were missing. Task is complete now |
|
Closing PR because the May ITP run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Changelist
Questions
None.