Files
LambdaMail/services/auth/vitest.config.ts
T
Lucas RayanandClaude Sonnet 5.5 7baaab2fd7
CI / Lint de idioma (R9) (push) Successful in 4s
CI / TypeScript (auth) (push) Successful in 2m51s
CI / TypeScript (storage) (push) Successful in 14s
CI / Go (protocols) (push) Successful in 3m12s
CI / Trivy (dependências, segredos e Dockerfiles) (push) Successful in 1m9s
CI / Build (webmail) (push) Successful in 2m9s
CI / Imagem (auth) (push) Successful in 58s
CI / Imagem (migrations) (push) Successful in 25s
CI / Imagem (rspamd) (push) Successful in 28s
CI / Imagem (protocols) (push) Successful in 1m32s
CI / Imagem (storage) (push) Successful in 1m18s
CI / Imagem (webmail) (push) Successful in 3m30s
CI / Stack completa (push) Successful in 3m44s
test(auth): give real Argon2id hashing a 30s test budget
The default 5s does not fit a chain of 11 hashes on a shared CI runner. The
production cost parameters are untouched.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 09:47:16 -03:00

18 lines
773 B
TypeScript

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",
},
},
});