39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
esbuild: {
|
|
legalComments: "inline",
|
|
},
|
|
test: {
|
|
globals: false,
|
|
environment: "happy-dom",
|
|
pool: "forks",
|
|
fileParallelism: false,
|
|
setupFiles: ["@suaveplan/testing/polyfills"],
|
|
include: ["src/**/*.test.ts", "src/**/*.test.tsx", "tests/**/*.test.ts"],
|
|
exclude: ["dist/**", "node_modules/**"],
|
|
coverage: {
|
|
provider: "istanbul",
|
|
reporter: ["text", "html", "lcov"],
|
|
include: ["src/**/*.ts", "src/**/*.tsx"],
|
|
exclude: [
|
|
"src/**/*.test.ts",
|
|
"src/**/*.test.tsx",
|
|
"src/**/*.stories.tsx",
|
|
"src/**/*.types.ts",
|
|
"src/**/index.ts",
|
|
"src/test-utils.tsx",
|
|
],
|
|
thresholds: {
|
|
statements: 100,
|
|
branches: 100,
|
|
functions: 100,
|
|
lines: 100,
|
|
},
|
|
},
|
|
testTimeout: 5000,
|
|
},
|
|
});
|