Skip to content

Commit 87d918b

Browse files
committed
fix(test): uses workspace config for local and CI parity
1 parent 95b67af commit 87d918b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"dev": "vite dev",
99
"build": "vite build",
1010
"preview": "vite preview",
11-
"test": "vitest run --config vitest.config.ts",
12-
"test:watch": "vitest --config vitest.config.ts",
11+
"test": "vitest run --config vitest.workspace.ts",
12+
"test:watch": "vitest --config vitest.workspace.ts",
1313
"deploy": "wrangler deploy",
1414
"typecheck": "tsc --noEmit",
1515
"test:e2e": "playwright test"

vitest.workspace.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import { defineConfig, defineProject } from "vitest/config";
22
import { cloudflareTest } from "@cloudflare/vitest-pool-workers";
3+
import solid from "vite-plugin-solid";
4+
import tailwindcss from "@tailwindcss/vite";
35

46
export default defineConfig({
57
test: {
68
projects: [
79
// Browser/DOM tests (stores, services, UI)
810
defineProject({
11+
plugins: [solid(), tailwindcss()],
912
test: {
1013
name: "browser",
1114
environment: "happy-dom",
1215
globals: true,
16+
setupFiles: ["tests/setup.ts"],
1317
include: ["tests/**/*.test.ts", "tests/**/*.test.tsx"],
1418
exclude: ["tests/worker/**"],
1519
},

0 commit comments

Comments
 (0)