Skip to content

London | 26-ITP-January | Karla Grajales | Sprint 3 | Practice TDD#1079

Open
Grajales-K wants to merge 12 commits intoCodeYourFuture:mainfrom
Grajales-K:coursework/sprint-3-practice-tdd
Open

London | 26-ITP-January | Karla Grajales | Sprint 3 | Practice TDD#1079
Grajales-K wants to merge 12 commits intoCodeYourFuture:mainfrom
Grajales-K:coursework/sprint-3-practice-tdd

Conversation

@Grajales-K
Copy link

@Grajales-K Grajales-K commented Feb 26, 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

This project is about how to implement the test cases first. Once we cover all possibilities, we can implement the function step by step. I learned that if we need to optimize our function, the test cases are much easier to adapt if we avoid naming them 'case 1'. 'case 2', etc. Using module.export and npx jest --watch command was very helpful to get the real-time feedback on what was happening in our implementation.

Questions

Is this how the learning approach should be? Should I study the test cases before solving the function, e.g, in Codewars?

Thank you

@Grajales-K Grajales-K added 🏕 Priority Mandatory This work is expected 📅 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. Submit:PR Module-Structuring-And-Testing-Data The name of the module. labels Feb 26, 2026
@Grajales-K Grajales-K changed the title London | 26-ITP-January | Karla Grajales | Sprint 3 | 2 Practice TDD London | 26-ITP-January | Karla Grajales | Sprint 3 | Practice TDD Feb 26, 2026
- Added an emoji to the error string.
- Included try/catch blocks in tests to verify manual error capturing.
- Updated Jest assertions to match the new error format.
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Is this how the learning approach should be? Should I study the test cases before solving the function, e.g, in Codewars?

Yes. It is not just a learning process; it is "the way".

Even without actually implementing the tests first, it is still the approach to take. That is, think about all possible input and the expected output before implementing the function.

If test cases are available, study them first.

@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 Mar 6, 2026
@Grajales-K
Copy link
Author

Is this how the learning approach should be? Should I study the test cases before solving the function, e.g, in Codewars?

Yes. It is not just a learning process; it is "the way".

Even without actually implementing the tests first, it is still the approach to take. That is, think about all possible input and the expected output before implementing the function.

If test cases are available, study them first.

Hi @cjyuan, Thank you once again for your time and for the review of my PR. I have made the suggested changes, and I will continue working on improving my confidence and skills when writing test cases.

@Grajales-K Grajales-K requested a review from cjyuan March 6, 2026 22:59
@Grajales-K Grajales-K added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 6, 2026
@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 6, 2026
@Grajales-K Grajales-K requested a review from cjyuan March 7, 2026 20:17
@Grajales-K Grajales-K added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 7, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Mar 8, 2026

All good now. Well done.

@cjyuan cjyuan 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 Mar 8, 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. Module-Structuring-And-Testing-Data The name of the module. 🏕 Priority Mandatory This work is expected 📅 Sprint 3 Assigned during Sprint 3 of this module Submit:PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants