London | 26-ITP-May | Liridona Shehu | Sprint 3 | Coursework/Sprint-3-Practice-TDD#1497
Open
shehu-dona wants to merge 11 commits into
Open
London | 26-ITP-May | Liridona Shehu | Sprint 3 | Coursework/Sprint-3-Practice-TDD#1497shehu-dona wants to merge 11 commits into
shehu-dona wants to merge 11 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
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.
cjyuan
reviewed
Jul 20, 2026
Comment on lines
16
to
21
| test("should append 'st' for numbers ending with 1, except those ending with 11", () => { | ||
| expect(getOrdinalNumber(11)).toEqual("11th"); | ||
| expect(getOrdinalNumber(1)).toEqual("1st"); | ||
| expect(getOrdinalNumber(21)).toEqual("21st"); | ||
| expect(getOrdinalNumber(131)).toEqual("131st"); | ||
| }); |
Contributor
There was a problem hiding this comment.
According to the test description, 11 does not belong to this test category.
| // Continue testing and implementing getOrdinalNumber for additional cases. | ||
| // Write your tests using Jest — remember to run your tests often for continual feedback. | ||
|
|
||
| // To ensure thorough testing, we need broad scenarios that cover all possible cases. |
Contributor
There was a problem hiding this comment.
The test categories and tests in this file do not yet covered all possible cases.
Author
There was a problem hiding this comment.
Added more tests to cover all possible cases.
Author
|
Hello @cjyuan, |
cjyuan
reviewed
Jul 20, 2026
Comment on lines
+37
to
+44
| test("should append 'th' for numbers ending with 4", () => { | ||
| expect(getOrdinalNumber(124)).toEqual("124th"); | ||
| expect(getOrdinalNumber(235)).toEqual("235th"); | ||
| expect(getOrdinalNumber(16)).toEqual("16th"); | ||
| expect(getOrdinalNumber(17)).toEqual("17th"); | ||
| expect(getOrdinalNumber(18)).toEqual("18th"); | ||
| expect(getOrdinalNumber(19)).toEqual("19th"); | ||
| }); |
Contributor
There was a problem hiding this comment.
I was referring to to "... with 4".
Author
|
Thank you for reviewing my PR. |
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.
Self checklist
Changelist
A PR about TDD