MEGAINFRA-WEBAPP/vitest.config.ts

21 lines
730 B
TypeScript
Raw Normal View History

2026-08-19 00:21:36 +00:00
import { defineConfig } from "vitest/config";
import path from "node:path";
export default defineConfig({
resolve: {
alias: [
{ find: "@", replacement: path.resolve(__dirname, "./src") },
// The `server-only` package ships inside Next.js' compiled dependencies
// and cannot be resolved by Vitest; point it at an empty stand-in.
{ find: /^server-only$/, replacement: path.resolve(__dirname, "./src/test-support/server-only.ts") },
],
2026-08-19 00:21:36 +00:00
},
test: {
environment: "node",
include: ["src/**/*.test.{ts,tsx}"],
// The PDF/PNG split test shells out to poppler; it takes a few seconds on
// its own and times out when the whole suite runs in parallel.
testTimeout: 15000,
2026-08-19 00:21:36 +00:00
},
});