30 lines
776 B
TypeScript
30 lines
776 B
TypeScript
import tsconfigPaths from "vite-tsconfig-paths";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
projects: [
|
|
{
|
|
plugins: [tsconfigPaths()],
|
|
esbuild: { jsx: "automatic" },
|
|
test: {
|
|
name: "node",
|
|
environment: "node",
|
|
include: ["src/**/*.test.ts"],
|
|
exclude: ["**/node_modules/**", "src/components/**", "src/app/**/page.test.tsx"],
|
|
},
|
|
},
|
|
{
|
|
plugins: [tsconfigPaths()],
|
|
esbuild: { jsx: "automatic" },
|
|
test: {
|
|
name: "jsdom",
|
|
environment: "jsdom",
|
|
include: ["src/components/**/*.test.tsx", "src/app/**/*.test.tsx"],
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|