Skip to content

London | ITP-Jan-26 | Alexandru Pocovnicu | Sprint 3 | Practice TDD#987

Open
alexandru-pocovnicu wants to merge 8 commits intoCodeYourFuture:mainfrom
alexandru-pocovnicu:coursework/sprint-3-practice-tdd
Open

London | ITP-Jan-26 | Alexandru Pocovnicu | Sprint 3 | Practice TDD#987
alexandru-pocovnicu wants to merge 8 commits intoCodeYourFuture:mainfrom
alexandru-pocovnicu:coursework/sprint-3-practice-tdd

Conversation

@alexandru-pocovnicu
Copy link

@alexandru-pocovnicu alexandru-pocovnicu commented Feb 18, 2026

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

Completed all exercises from practice tdd

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 18, 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 Feb 18, 2026
@github-actions

This comment has been minimized.

4 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 18, 2026
Comment on lines +3 to +4
let numberLastDigit = numberToString[numberToString.length - 1];
let numberLast2Digits = numberToString.slice(numberToString.length - 2);
Copy link
Contributor

Choose a reason for hiding this comment

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

.slice(-N) is clear enough to indicate it extract the last N characters from a string, regardless of string length.

Comment on lines +23 to +34
test("should repeat string count times", () => {
const str = "bye";
const count = 1;
const repeatedStr = repeatStr(str, count);
expect(repeatedStr).toEqual("bye");
});

// Case: Handle count of 0:
// Given a target string `str` and a `count` equal to 0,
// When the repeatStr function is called with these inputs,
// Then it should return an empty string.
test("should repeat string count times", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you revise these test descriptions to make the failure messages more informative, so it's immediately clear both what caused the test to fail and what the expected outcome was?

Comment on lines +43 to +48
test("should append 'th' for numbers ending with any number including 11,12 or 13, except those ending with 1,2 or 3", () => {
expect(getOrdinalNumber(12)).toEqual("12th");
expect(getOrdinalNumber(25)).toEqual("25th");
expect(getOrdinalNumber(111)).toEqual("111th");
expect(getOrdinalNumber(4)).toEqual("4th");
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add more test cases to this group to make the coverage more comprehensive?
If the number of cases becomes too large, you can consider organizing them into meaningful subcategories.

@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 Feb 25, 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