Overview

Testing

Test configuration#

The repo's test setup lives in test.config.ts at the project root, alongside vite.config.ts. Since Vitest is Vite-native, the test runner shares the same underlying tooling as the library's build step described in local development.

Why this pairing#

  • Vitest gives fast, Vite-powered test runs with the same module resolution and config as the rest of the build.
  • React Testing Library encourages testing components the way a user would interact with them — through rendered output, not internal implementation details.

Where testing fits in#

Tests run alongside the other quality tooling in the repo: ESLint for static analysis, Husky git hooks to catch issues before a commit lands, and Chromatic for visual regression testing against the Storybook catalog. See tech stack for how all of these fit together.


← Back: Storybook · Next: Contributing →

Updated

Was this page helpful?