London | 26-ITP-January | Karla Grajales | Sprint 3 | Practice TDD#1079
London | 26-ITP-January | Karla Grajales | Sprint 3 | Practice TDD#1079Grajales-K wants to merge 12 commits intoCodeYourFuture:mainfrom
Conversation
…e string repetition logic
- 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.
cjyuan
left a comment
There was a problem hiding this comment.
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. |
…d utilizing built-in method
|
All good now. Well done. |
Learners, PR Template
Self checklist
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.exportandnpx jest --watchcommand 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