Visitenbuch/vitest.config.integration.js
ThetaDev 0d1421285f
All checks were successful
Visitenbuch CI / test (push) Successful in 1m24s
test: make test db URL configurable
2024-05-12 22:38:58 +02:00

20 lines
596 B
JavaScript

// Prisma integration tests with Vitest
// https://www.prisma.io/blog/testing-series-3-aBUyF8nxAn
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [sveltekit()],
test: {
include: ["tests/integration/**/*.ts"],
minWorkers: 1,
maxWorkers: 1,
maxConcurrency: 1,
setupFiles: ["tests/helpers/setup.ts"],
env: {
// eslint-disable-next-line no-undef
DATABASE_URL: process.env.TEST_DATABASE_URL ?? "postgresql://postgres:1234@localhost:5432/test?schema=public",
},
},
});