- 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/
27 lines
616 B
TypeScript
27 lines
616 B
TypeScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify("0.0.0-test"),
|
|
},
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
css: false,
|
|
include: ["src/**/*.{test,spec}.{ts,tsx}"],
|
|
exclude: ["node_modules", "dist", "e2e"],
|
|
},
|
|
});
|