-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.mts
More file actions
23 lines (21 loc) · 766 Bytes
/
Copy pathvitest.config.mts
File metadata and controls
23 lines (21 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import path from "node:path";
import { defineConfig } from "vitest/config";
const wurzel = import.meta.dirname;
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(wurzel, "src"),
// "server-only" wirft beim Import außerhalb einer Next-Server-Umgebung.
// Für Tests wird es durch ein leeres Modul ersetzt — die Schutzwirkung
// gilt dem Client-Bundle, nicht dem Testlauf.
"server-only": path.resolve(wurzel, "tests/stubs/server-only.ts"),
},
},
test: {
environment: "node",
include: ["tests/**/*.test.ts"],
// Die Integrationstests teilen sich eine SQLite-Datei; parallele Läufe
// würden sich gegenseitig die Daten unter den Füßen wegziehen.
fileParallelism: false,
},
});