Skip to content

West Midlands | ITP-26-May | Alina Sofragiu | Sprint 3 | Practice TDD#1420

Open
sofragiualina wants to merge 2 commits into
CodeYourFuture:mainfrom
sofragiualina:coursework/sprint-3-practice-tdd
Open

West Midlands | ITP-26-May | Alina Sofragiu | Sprint 3 | Practice TDD#1420
sofragiualina wants to merge 2 commits into
CodeYourFuture:mainfrom
sofragiualina:coursework/sprint-3-practice-tdd

Conversation

@sofragiualina

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • [ x ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • [ x ] My changes meet the requirements of the task
  • [ x ] I have tested my changes
  • [ x ] My changes follow the style guide

Changelist

Completed Test-Driven Development practice

@sofragiualina sofragiualina added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Jun 28, 2026

@LonMcGregor LonMcGregor 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.

Good start, but I think you could expand your test cases a bit further

@@ -22,3 +22,9 @@ test("should count multiple occurrences of a character", () => {
// And a character `char` that does not exist within `str`.
// When the function is called with these inputs,
// Then it should return 0, indicating that no occurrences of `char` were found.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good test case for 0. Are there any other test cases you think you should add?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, I added more test cases for a single occurrence, an empty string, and case sensitivity

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These are good to test your edge cases. Do any of these test the normal operation of the repeat function?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, first test checks that the string is repeated multiple times count=3 and the second one checks the normal case count=1

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

Labels

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. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants