Repository navigation
Manchester | 26-ITP-Sept | Rahana Suleiman | Sprint 2 | Implement and rewrite tests - #1702
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
27995e0 to
02b9cb7
Compare
This comment has been minimized.
This comment has been minimized.
02b9cb7 to
6b39842
Compare
This comment has been minimized.
This comment has been minimized.
6b39842 to
8529aeb
Compare
This comment has been minimized.
This comment has been minimized.
8529aeb to
3e8c9c9
Compare
| throw new Error(`Expected a string, but got ${typeof card}`); | ||
| } | ||
|
|
||
| const cardRegex = /^(10|[2-9]|[AJQK])([♠♥♦♣])$/; |
|
Good job! Very clean implementations and thorough test coverage, especially around the boundaries. Apart from a couple of small issues with the provided tests and formatting - everything looks solid! |
|
Hi @webmonch , thank you so much for the helpful review and feedback! I have addressed the points you raised: getCardValue & getAngleType tests: Refactored the test assertions to ensure they are robust and cleaner, while keeping the boundary value checks thorough. Provided tests: Restored and respected the originally provided test cases as requested. The updates have been pushed and the PR is ready for another look. Thanks again for your time!" |
|
Thanks for your code fixes and sorry for our delay in review. It seems to me that the changes in 922023b and 4bf1349 might be made to the wrong file. The tests under the |
|
Hi @hackertainment, thank you for spotting that! I've reverted commits |
|
I can see your code has been rollback correctly. However, all fixes mentioned in your comment #1702 (comment) unfortunately have been gone as well. I know it would be a bit of frustration, and if possible would you please fix those points again? Thank you so much for your effort. |
…t.strictEqual and improve error handling
|
For the original comment https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/pull/1702/changes#r4330568527 , the current test is that |
Self checklist
Task code
CYF-1059
Changelist
This PR implements the getAngleType, isProperFraction, and getCardValue functions alongside comprehensive unit test suites using both node:test and Jest to cover all standard, edge, and invalid input cases.