Skip to content

Conversation

@khalidbih
Copy link

@khalidbih khalidbih commented Nov 20, 2025

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

I have completed the coursework/sprint-3/ 2-practice-tdd

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@khalidbih khalidbih added 📅 Sprint 3 Assigned during Sprint 3 of this module Module-Structuring-And-Testing-Data The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 20, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 20, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

3 similar comments
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-3) doesn't match expected format (example: 'Sprint 2', without quotes)

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@khalidbih khalidbih changed the title Manchester | 25-ITP-September | khalidbih | Sprint-3 | 2-practice-tdd Manchester | 25-ITP-September | khalidbih | Sprint 3 | 2-practice-tdd Nov 20, 2025
@khalidbih khalidbih added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 20, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code is working well.

Some test descriptions could use some improvement.

Comment on lines 38 to 46

test("should return '21st', '22nd', '23rd'", () => {
expect(getOrdinalNumber(21)).toEqual("21st");
expect(getOrdinalNumber(22)).toEqual("22nd");
expect(getOrdinalNumber(23)).toEqual("23rd");
expect(getOrdinalNumber(101)).toEqual("101st");
expect(getOrdinalNumber(102)).toEqual("102nd");
expect(getOrdinalNumber(103)).toEqual("103rd");
});
Copy link
Contributor

Choose a reason for hiding this comment

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

The test description does not quite describe the tests being performed. Can you improve it?

Copy link
Author

Choose a reason for hiding this comment

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

I updated the test description to clearly describe numbers ending in 1, 2, or 3, excluding 11,13.

Comment on lines 30 to 37
test("should return '11th', '12th', '13th' for special cases", () => {
expect(getOrdinalNumber(11)).toEqual("11th");
expect(getOrdinalNumber(12)).toEqual("12th");
expect(getOrdinalNumber(13)).toEqual("13th");
expect(getOrdinalNumber(111)).toEqual("111th");
expect(getOrdinalNumber(112)).toEqual("112th");
expect(getOrdinalNumber(113)).toEqual("113th");
});
Copy link
Contributor

Choose a reason for hiding this comment

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

“Special cases" isn't a very informative description.
A phrase like "numbers ending in …" would provide more clarity.

Copy link
Author

Choose a reason for hiding this comment

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

I updated the test description to clearly state that numbers ending in 11, 12, and 13 always use ‘th’.

@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 Nov 21, 2025
@khalidbih khalidbih added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Nov 21, 2025
@khalidbih
Copy link
Author

Code is working well.

Some test descriptions could use some improvement.

I updated the test description to clearly describe numbers ending in 1, 2, .or 3, excluding 11,13.

@cjyuan
Copy link
Contributor

cjyuan commented Nov 21, 2025

Looks good.

@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. labels Nov 21, 2025
@khalidbih
Copy link
Author

Looks good.

Thank you so much.

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.

2 participants