Files
Space-Banane 7e05dd918c
Deploy / Build (push) Successful in 28s
Deploy / Test & Lint (push) Failing after 29s
Deploy / Build and Push Docker Image (push) Has been skipped
Patchpass V1
2026-07-18 20:14:44 +02:00

31 lines
961 B
TypeScript

import { defineConfig } from "vitest/config";
import { config as dotenvConfig } from "dotenv";
import { join } from "path";
dotenvConfig({ path: join(__dirname, ".env") });
// Tests run against a dedicated database so they never touch dev data.
process.env.NODE_ENV = "test";
process.env.DATABASE_URL =
process.env.TEST_DATABASE_URL ||
"postgresql://patchpass:patchpass@localhost:5433/patchpass_test";
// Deterministic secret so signature assertions are stable.
process.env.INSTANCE_SECRET =
process.env.INSTANCE_SECRET || "test_instance_secret_for_signing_receipts_0001";
process.env.LOG_LEVEL = process.env.LOG_LEVEL || "silent";
export default defineConfig({
test: {
globals: true,
environment: "node",
include: ["src/tests/**/*.test.ts"],
exclude: ["**/node_modules/**", "**/dist/**"],
globalSetup: ["src/tests/globalSetup.ts"],
fileParallelism: false,
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
},
},
});