Add Vitest and @vitest/coverage-v8 for unit testing. Configure test scripts and add coverage directory to gitignore. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
15 lines
359 B
TypeScript
15 lines
359 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
environment: "node",
|
|
include: ["src/**/*.test.ts"],
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "html"],
|
|
include: ["src/**/*.ts"],
|
|
exclude: ["src/**/*.test.ts", "src/**/types.ts", "src/**/*.d.ts"],
|
|
},
|
|
},
|
|
});
|