import { defineConfig } from "vitest/config"; export default defineConfig({ test: { // Real Argon2id hashes cost 1-3s each on a shared CI runner, and several // tests chain a dozen of them. The production cost parameters stay as they // are; the default 5s budget is what does not fit. testTimeout: 30_000, // session.ts refuses to load without a real signing secret, and ESM hoists // imports - so the value has to exist before any test file is evaluated, // which an assignment inside a test file cannot guarantee. env: { JWT_SECRET: process.env.JWT_SECRET ?? "a-test-signing-secret-long-enough-for-the-guard", LAMBDAMAIL_MASTER_KEY: process.env.LAMBDAMAIL_MASTER_KEY ?? "test-master-key-at-least-16-chars", }, }, });