- Using
create-react-app
, what do we need to set up for testing? - What components are worth to test in your development?
- Can you apply TDD once you already created components?
NOTE: Apply TDD as much as you can.
- Find any sub-routine, extract that logic into a separate file and test it out.
- Run test coverage and save results into a .txt file at ./ - root level. Can you make the total coverage to be above of 60%?
- Meaningful test cases were implemented for components and sub-routines logic.
- All the test cases were successful.
- Test coverage is above 60%.
Using create-react-app, what do we need to set up for testing?
We need to add the library @testing-library/react then import it to the tests files
What components are worth to test in your development?
The HTML elements
Can you apply TDD once you already created components?
Yes, Test Driven Development will allows to create test once the component is created.