Automated testing
Overview of the testing tools available in the project
This boilerplate comes with various testing setups to ensure your application's reliability and robustness.
Files related to this page
Unit & Integration Testing
Jest is a popular and battle-tested library created by Meta used for unit and integration testing by millions of developers.
Run pnpm run test
to run the tests.
Refer to the Predefined Scripts file for more information on the available scripts.
End-to-End Testing
Playwright is used for end-to-end testing.
- Run
pnpm run e2e:headless
to run the tests in headless mode. - Run
pnpm run e2e:ui
to run the tests in UI mode.
Refer to the Predefined Scripts file for more information on the available scripts.
Acceptance Testing
To write acceptance tests, we leverage Storybook's play function. This allows you to interact with your components and test various user flows within Storybook.
Smoke Testing
In this boilerplate, we use Storybook's out-of-the-box support for smoke testing to verify that components render correctly without any errors. Just run pnpm run test-storybook to perform smoke testing. Remember to write stories in JSX or TSX format only. Smoke testing and a lot of other functionalities dont work well with MDX stories.