Server/project/vitest.config.ts

37 lines
1011 B
TypeScript
Raw Normal View History

import path from "node:path";
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
name: "spt-server",
reporters: ["default"],
root: "./",
include: ["**/*.{test,spec}.?(c|m)[jt]s?(x)"],
cache: {
2023-11-10 21:16:53 +01:00
dir: "./tests/__cache__",
},
environment: "./tests/CustomEnvironment.ts",
globals: true,
coverage: {
provider: "istanbul",
reporter: ["text", "html"],
2023-11-04 19:37:16 +01:00
reportsDirectory: "./tests/__coverage__",
reportOnFailure: true,
2023-11-04 19:37:16 +01:00
all: true,
include: ["src"],
2023-11-10 21:16:53 +01:00
exclude: ["src/models/**", "tests/**"],
},
pool: "threads",
poolOptions: {
threads: {
singleThread: true,
2023-11-10 21:16:53 +01:00
isolate: false,
},
},
alias: {
"@spt-aki": path.resolve(__dirname, "src"),
2023-11-10 21:16:53 +01:00
"@tests": path.resolve(__dirname, "tests"),
},
},
});