Skip to content

Commit 34319db

Browse files
chore(test): catalog @playwright/test and wire e2e into turbo
- Promote @playwright/test to the workspace catalog - Add test:e2e turbo task (uncached) - Add root pnpm test:e2e script - Vitest scopes to src/**/*.{test,spec} and excludes e2e/
1 parent 557fecf commit 34319db

6 files changed

Lines changed: 15 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"build": "turbo run build",
99
"lint": "turbo run lint",
1010
"test": "turbo run test",
11+
"test:e2e": "turbo run test:e2e",
1112
"typecheck": "turbo run typecheck",
1213
"prepare": "husky"
1314
},

packages/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"zod": "catalog:"
4444
},
4545
"devDependencies": {
46-
"@playwright/test": "^1.59.1",
46+
"@playwright/test": "catalog:",
4747
"@tanstack/router-plugin": "^1.120.3",
4848
"@testing-library/jest-dom": "catalog:",
4949
"@testing-library/react": "catalog:",

packages/web/vitest.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { defineConfig } from "vitest/config";
2-
import react from "@vitejs/plugin-react";
31
import path from "node:path";
42
import { fileURLToPath } from "node:url";
3+
import react from "@vitejs/plugin-react";
4+
import { defineConfig } from "vitest/config";
55

66
const __dirname = path.dirname(fileURLToPath(import.meta.url));
77

@@ -20,5 +20,7 @@ export default defineConfig({
2020
globals: true,
2121
setupFiles: ["./src/test/setup.ts"],
2222
css: false,
23+
include: ["src/**/*.{test,spec}.{ts,tsx}"],
24+
exclude: ["node_modules", "dist", "e2e"],
2325
},
2426
});

pnpm-lock.yaml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ catalog:
88
"@biomejs/biome": "^2.4.0"
99

1010
# Testing
11+
"@playwright/test": "^1.59.1"
1112
"@testing-library/jest-dom": "^6.6.3"
1213
"@testing-library/react": "^16.3.0"
1314
"@testing-library/user-event": "^14.6.1"

turbo.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"test": {
1616
"inputs": ["src/**", "vitest.config.*", "package.json"]
1717
},
18+
"test:e2e": {
19+
"cache": false,
20+
"inputs": ["e2e/**", "src/**", "playwright.config.*", "package.json"]
21+
},
1822
"cargo-check": {
1923
"inputs": ["src-tauri/src/**", "src-tauri/Cargo.toml", "src-tauri/Cargo.lock"],
2024
"outputs": []

0 commit comments

Comments
 (0)