Skip to content

London | 26-ITP-Jan | Carlos Abreu | Sprint 3 | Practice TDD Coursework#1150

Open
carlosyabreu wants to merge 2 commits intoCodeYourFuture:mainfrom
carlosyabreu:coursework/sprint-3-practice-tdd
Open

London | 26-ITP-Jan | Carlos Abreu | Sprint 3 | Practice TDD Coursework#1150
carlosyabreu wants to merge 2 commits intoCodeYourFuture:mainfrom
carlosyabreu:coursework/sprint-3-practice-tdd

Conversation

@carlosyabreu
Copy link

Learners, PR Template

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

PR for Sprint-3 of Practice TDD Coursework

@carlosyabreu carlosyabreu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 3, 2026
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.

Function implementation is solid, especially on validating the parameters.
Test cases are comprehensive! Well done!

I think some of the test descriptions could be made more informative.

});

// Additional test cases to ensure robustness
test("should handle empty string", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

The person implementing the function may not immediately understand what "handle" means. It would be clearer to describe the expected behavior directly in the test description, such as specifying what the function should return.

Can you check which test descriptions (in all three test.js files) can be made more informative?

*/

function getOrdinalNumber(number) {
if (typeof number !== 'number' || !Number.isInteger(number) || number < 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

One of the check here is redundant.

});

// Case 5: All other numbers (should get "th")
test("should append 'th' for all other numbers", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

When a test fails with the message "... all other numbers", it may be unclear what "other numbers" actually refers to.
Can you revise the test description to make it more informative?

@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 Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants