web: smoke-test the built standalone app against a mock graphql cms
This commit is contained in:
@@ -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)),
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user