Fix test:run failing in CI due to missing Playwright browser (#246)

Scope test:run to the unit project only so it doesn't attempt to launch
Playwright/Chromium (needed by the storybook browser project) in environments
where browsers aren't installed. Add test:storybook script for running
storybook stories explicitly when Playwright is available.

https://claude.ai/code/session_01PqDTVMzP7dMtLpkn5Sw442

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Chris Parsons 2026-03-30 14:42:23 -07:00 committed by GitHub
parent 2b13e153d6
commit 28a670666c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -14,7 +14,8 @@
"test": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest --coverage",
"test:run": "vitest run",
"test:run": "vitest run --project=unit",
"test:storybook": "vitest run --project=storybook",
"test:e2e": "cypress open",
"test:e2e:headless": "cypress run",
"test:all": "npm run test:run && npm run test:e2e:headless",

View file

@ -35,6 +35,7 @@ export default defineConfig({
projects: [{
extends: true,
test: {
name: 'unit',
globals: true,
environment: 'jsdom',
setupFiles: ['./app/test/setup.ts']