Skip to content

Cape Town | 26-ITP-May | Liyema Mfengwana | Sprint 3 | PracticeTDD - #1512

Open
LiyemaMfengwana wants to merge 15 commits into
CodeYourFuture:mainfrom
LiyemaMfengwana:practice-sprint3
Open

Cape Town | 26-ITP-May | Liyema Mfengwana | Sprint 3 | PracticeTDD#1512
LiyemaMfengwana wants to merge 15 commits into
CodeYourFuture:mainfrom
LiyemaMfengwana:practice-sprint3

Conversation

@LiyemaMfengwana

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

Changelist

complete practicetdd

@LiyemaMfengwana LiyemaMfengwana added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 15, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 20, 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.

Have you been running these tests on your machine? I get an error when I try to run them. Can you try to figure out what is happening?

const str = "hello";
const count = -1;

expect(() => repeatStr(str, count)).toThrow();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does this test ever pass?

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.

Yeah, these tests should pass. They are checking the basic cases like repeating the string multiple times, returning the same string when the count is 1, an empty string when the count is 0, and throwing an error if the count is negative. If they are not passing, I think the problem is probably with the function code or the test setup, not the tests themselves.

@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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 20, 2026
@LiyemaMfengwana LiyemaMfengwana added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 23, 2026
@LonMcGregor

Copy link
Copy Markdown

Have you run the tests on your machine? When I run them, I get an error. Can you try to figure out why this might be happening?

 FAIL  Sprint-3/2-practice-tdd/repeat-str.test.js
  ● Test suite failed to run

    Jest encountered an unexpected token

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 27, 2026
@LiyemaMfengwana LiyemaMfengwana added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 1, 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.

I am still getting an error with running jest. Have a look and make sure the functions are defined properly. Have you got any duplicate function names?

@LonMcGregor LonMcGregor removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 1, 2026
@LiyemaMfengwana LiyemaMfengwana added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 1, 2026
@LiyemaMfengwana

Copy link
Copy Markdown
Author

PASS Sprint-3/2-practice-tdd/repeat-str.test.js
PASS Sprint-3/2-practice-tdd/get-ordinal-number.test.js
PASS Sprint-3/4-stretch/password-validator.test.js
PASS Sprint-3/2-practice-tdd/count.test.js

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

You spotted that you needed to remove the duplicate functions - good!

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants