Skip to content

London | 26-ITP-May | Liridona Shehu | Sprint 3 | Coursework/Sprint-3-Practice-TDD#1497

Open
shehu-dona wants to merge 11 commits into
CodeYourFuture:mainfrom
shehu-dona:coursework/sprint-3-practice-tdd
Open

London | 26-ITP-May | Liridona Shehu | Sprint 3 | Coursework/Sprint-3-Practice-TDD#1497
shehu-dona wants to merge 11 commits into
CodeYourFuture:mainfrom
shehu-dona:coursework/sprint-3-practice-tdd

Conversation

@shehu-dona

Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

A PR about TDD

@shehu-dona shehu-dona changed the title London | 26-ITP-May | Liridona Shehu | Sprint 3 | Coursework/Sprint-3-practice-tdd London | 26-ITP-May | Liridona Shehu | Sprint 3 | Coursework/Sprint-3-Practice-TDD Jul 14, 2026
@shehu-dona shehu-dona added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jul 14, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@shehu-dona shehu-dona added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 2026
@shehu-dona shehu-dona added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 2026
@shehu-dona shehu-dona added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 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");
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test categories and tests in this file do not yet covered all possible cases.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more tests to cover all possible cases.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 20, 2026
@shehu-dona

Copy link
Copy Markdown
Author

Hello @cjyuan,
I read your messages and updated the code.

@shehu-dona shehu-dona added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 20, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good.

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");
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in description.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed typo in description.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was referring to to "... with 4".

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jul 20, 2026
@shehu-dona

Copy link
Copy Markdown
Author

Thank you for reviewing my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants