32 lines
1.1 KiB
TypeScript
32 lines
1.1 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: ["src/__benchmarks__/**", "benchmarks/**", "e2e/**", "dist/**", "node_modules/**"],
|
|
coverage: {
|
|
provider: "istanbul",
|
|
reporter: ["text", "html", "lcov"],
|
|
include: ["src/**/*.ts"],
|
|
exclude: [
|
|
"src/**/*.test.ts",
|
|
"src/**/*.bench.ts",
|
|
"src/**/*.schemas.ts",
|
|
"src/**/*.types.ts",
|
|
"src/**/index.ts",
|
|
"src/__benchmarks__/**",
|
|
"tests/**",
|
|
// Legacy ReadableStream fallback — only reachable on runtimes without
|
|
// Symbol.asyncIterator on ReadableStream (not Bun / Node 18+).
|
|
"src/detection/from-stream-reader.ts",
|
|
],
|
|
thresholds: { statements: 100, branches: 100, functions: 100, lines: 100 },
|
|
},
|
|
testTimeout: 5000,
|
|
},
|
|
});
|