24 lines
768 B
TypeScript
24 lines
768 B
TypeScript
import { fileURLToPath } from "node:url";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
// Smoke tests: `next build` against a mock CMS, then HTTP assertions against
|
|
// the standalone server (the artifact the Docker image ships). Run with
|
|
// `npm run test:smoke`; kept out of `npm test` so unit tests stay fast.
|
|
export default defineConfig({
|
|
test: {
|
|
include: ["tests/smoke/**/*.test.ts"],
|
|
globalSetup: ["tests/smoke/global-setup.ts"],
|
|
// the revalidation test mutates shared mock-CMS state
|
|
fileParallelism: false,
|
|
testTimeout: 30_000,
|
|
// globalSetup runs a full `next build`
|
|
hookTimeout: 600_000,
|
|
env: { TZ: "Europe/Oslo" },
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
});
|