Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.08 KB

testing.md

File metadata and controls

41 lines (31 loc) · 1.08 KB

Testing

Unit Testing

To run unit tests (app/**/*.test.ts) with Vitest use

# In watch mode
npm run test
# or in single run mode with coverage
npm run test -- run --coverage

End-to-End Testing

To run end-to-end tests (tests/*.spec.ts) with Playwright use

docker compose -f deploy/arq/docker-compose.yml -p playwright pull
docker compose -f deploy/arq/docker-compose.yml -p playwright build
# To avoid flakyness, start in a fresh state
docker compose -f deploy/arq/docker-compose.yml -p playwright down -v
# Install browsers
npx playwright install
# Run tests on all browsers
npx playwright test
# or for interactive mode, use `await page.pause()` in tests
npx playwright test --headed --timeout 0
# or to run with webkit
npx playwright test --project webkit

Playwright can not be run when you are inside a devcontainer. You need to run it on your host machine.

Component testing and development

Use Storybook to develop and test components in isolation.

npm run storybook