Skip to content

Cape Town | sep-2026-ITP | Matthaus Bause | Sprint 2 | TDD - #1687

Open
chefmatthaus-hub wants to merge 3 commits into
CodeYourFuture:mainfrom
chefmatthaus-hub:coursework/sprint-3-practice-tdd-clean
Open

chefmatthaus-hub wants to merge 3 commits into
CodeYourFuture:mainfrom
chefmatthaus-hub:coursework/sprint-3-practice-tdd-clean

Conversation

@chefmatthaus-hub

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

Task code

CYF-1060

@chefmatthaus-hub chefmatthaus-hub added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 12, 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 Oct 18, 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.

The code generally looks good to me. Please keep it up.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your test cases are correct. Just for you to think a little bit more, besides str = "hello" or str = "bye", what special string should also be added to each of the test cases?

@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 Oct 19, 2026
Comment on lines +20 to +25
test("should return 0 when character is not found", () => {
const str = "hello";
const char = "z";
const count = countChar(str, char);
expect(count).toEqual(0);
});

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 a special str that gives 0 anyway. Please add that test case as well. Thank you.

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