Testing During Development
How to locally test the app during development.
Local Unit Tests
Before submitting your updates, verify they pass all unit tests. Follow these steps to run tests locally:
-
Copy your
.env.examplefile in the/apifolder and rename it to.env -
Add
NODE_ENV=CIto your/api/.envfile -
npm run test:client -
npm run test:api
Running Tests Per-Workspace
Tests are run using Jest from their respective workspace directories. Target specific test files with patterns:
Tip
Use test/layout-test-utils for rendering components in frontend tests. Cover loading, success, and error states for UI/data flows.
How is this guide?