Testing
Testing is handled via vitest
and @testing-library/react
. vitest
provides the test runner, test structure framework (it
, describe
, test
), manages assertions, while React Testing Library handles DOM manipulation, querying utilities, and user event simulation.
E2E and integration tests using the likes of Playwright are not included. In the early stages of development you'll find yourself redesigning and changing flows pretty frequently which can make writing and maintaining these tests more work than it's worth.
Types of testing
With Remix apps you'll generally want to test your route handlers (loader
and action
methods), or simply React components or pages. For an example of a router handler test see dashboard.issues.$issueId.test.tsx
, for a React component/Remix route test, see _auth.login.test.tsx
.