Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 857 Bytes

readme.md

File metadata and controls

11 lines (6 loc) · 857 Bytes

Tests

The test runner is called Vitest and it's set up to run tests in the src folder. You can add more tests in the src folder and they will be picked up by Vitest, so long as you name them with the .test.jsx extension. Make sure to use the .jsx extension, not .js.

You can write tests using the same Jest syntax you have already learned in these files.

The React Testing Library is also available in the tests, and the docs are a great resource for learning how to use it.

You will need to write a test for each component you build. Write the test first, based on the requirements given in the ticket. Then write the component to make the test pass.

There are some examples given to help you. Come to class with questions about how to write tests.