From 28a670666c48bd89bcd5a8c05d21957dba8e10f6 Mon Sep 17 00:00:00 2001 From: Chris Parsons <438676+chrisparsons83@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:42:23 -0700 Subject: [PATCH] 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 --- package.json | 3 ++- vitest.config.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 297a474..89511e2 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/vitest.config.ts b/vitest.config.ts index ab4c59e..bdef9b0 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -35,6 +35,7 @@ export default defineConfig({ projects: [{ extends: true, test: { + name: 'unit', globals: true, environment: 'jsdom', setupFiles: ['./app/test/setup.ts']