web: smoke-test the built standalone app against a mock graphql cms

This commit is contained in:
2026-08-31 03:26:54 +02:00
parent 6d0932e44c
commit 389b95ed85
8 changed files with 870 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
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)),
},
},
});