To run API tests:
cd api
npm run testTo run frontend Storybook tests:
cd frontend
npm run testAll pull requests must pass both API and frontend tests before they can be merged. The tests are run automatically in GitHub Actions.
The Storybook tests run all stories marked for testing in our vite.config.js. To add a new component to the test suite:
- Make sure your story has a working play function if you're testing interactions
- Add the story file path to the
includedStoriesarray infrontend/vite.config.js - Run the tests locally to verify they pass
Stories can be marked with tags to indicate their status:
testable: Stories that are ready for testingstable: Stories that are stable and should be included in the test suite
Example:
export default {
title: 'Components/MyComponent',
component: MyComponent,
tags: ['testable'],
};