Skip to content

Tests and stories

Herb Caudill edited this page Sep 25, 2024 · 2 revisions

Integration tests

Playwright tests are in /tests. The Playwright VS Code extension is the easiest way to run these.

To run the tests in the command line:

pnpm test:pw

To open a browser-based UI for running the tests:

pnpm test:pw:ui

Unit tests

Vitest tests are in app/**/lib/tests. To run them in the command line in watch mode:

pnpm test

Performance benchmarks

Vitest includes a bench mode that performs benchmark tests. We're using this to run some performance tests that we don't want to be run during normal test runs. These tests live in files named with *.benchmark.ts. To run them in the command line in watch mode:

pnpm benchmark

Linter

The repository is set up to use XO for linting. The XO VS Code extension will highlight any linting issues as you work.

To lint the whole codebase in the command line:

pnpm lint

Storybook stories

Stories show a given UI component in its different possible states. They are set up in app/**/ui/stories.

To open the Storybook interface in dev mode with hot reloading:

pnpm storybook

Clone this wiki locally