Skip to content

London | 26-ITP-Sep | Rhoda Ajiroba | Sprint 3 | Practice TDD - #1771

Open
codebyra wants to merge 1 commit into
CodeYourFuture:mainfrom
codebyra:coursework/practice-tdd
Open

codebyra wants to merge 1 commit into
CodeYourFuture:mainfrom
codebyra:coursework/practice-tdd

Conversation

@codebyra

@codebyra codebyra commented Nov 9, 2026

Copy link
Copy Markdown

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

Task code

CYF-1060

Changelist

Implemented and tested three JavaScript functions: count(), repeatStr() and getOrdinalNumber(), including edge cases. All 13 Jest tests pass.

@codebyra codebyra added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 9, 2026
@hackertainment hackertainment added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 10, 2026

@hackertainment hackertainment left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for your coursework and just 1 fix required. Thank you.

Comment on lines +27 to +34
test("should return an empty string when count is 0", () => {
const str = "hello";
const count = 0;

const repeatedStr = repeatStr(str, count);

expect(repeatedStr).toEqual("");
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There should be another scenario of str so that a non-zero count would still .toEqual(""). Can you add that special case as well? Thank you.

@hackertainment hackertainment added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Nov 10, 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