Files
calebburke.dev/api/vite.config.mts
T
2026-06-24 23:47:55 -07:00

33 lines
703 B
TypeScript

import { defineConfig } from "vitest/config"
import tsconfigPaths from "vite-tsconfig-paths"
export default defineConfig({
plugins: [
tsconfigPaths({
root: ".",
projects: ["./tsconfig.json", "./tests/tsconfig.json"],
}),
],
test: {
globals: true,
root: ".",
globalSetup: "./tests/global-setup.ts",
setupFiles: ["./tests/setup.ts"],
isolate: true,
poolOptions: {
forks: {
singleFork: true,
},
},
forceRerunTriggers: [
"**/*.(html|txt)", // Rerun tests when data files change
],
// Mocking
clearMocks: true,
mockReset: true,
restoreMocks: true,
unstubEnvs: true,
unstubGlobals: true,
},
})