39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: false,
|
|
environment: "node",
|
|
pool: "forks",
|
|
setupFiles: ["./tests/setup/polyfills.ts"],
|
|
include: ["src/**/*.test.ts", "tests/**/*.test.ts"],
|
|
exclude: ["dist/**", "node_modules/**"],
|
|
coverage: {
|
|
provider: "istanbul",
|
|
reporter: ["text", "html", "lcov"],
|
|
include: ["src/**/*.ts"],
|
|
exclude: [
|
|
"src/**/*.test.ts",
|
|
"src/**/*.types.ts",
|
|
"src/**/index.ts",
|
|
"src/**/*.bench.ts",
|
|
"src/index.ts",
|
|
"src/testing/**",
|
|
"tests/**",
|
|
],
|
|
thresholds: {
|
|
statements: 100,
|
|
// Two defensive ternary fallbacks (performance.now → Date.now;
|
|
// empty-POST-body short-circuit) cannot be exercised on Node 18+.
|
|
// Both arms are wrapped in `/* istanbul ignore */` but the
|
|
// branch counter still records them under istanbul 1.6.x.
|
|
branches: 98,
|
|
functions: 100,
|
|
lines: 100,
|
|
},
|
|
},
|
|
testTimeout: 60000,
|
|
hookTimeout: 60000,
|
|
},
|
|
});
|