2023-11-02 16:58:16 +01:00
|
|
|
import path from "node:path";
|
2023-10-28 05:55:34 +02:00
|
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
test: {
|
|
|
|
name: "spt-server",
|
2023-11-03 22:39:33 +01:00
|
|
|
reporters: ["default"],
|
2023-11-04 19:31:37 +01:00
|
|
|
root: "./",
|
2023-11-07 21:42:32 +01:00
|
|
|
include: ["**/*.{test,spec}.?(c|m)[jt]s?(x)"],
|
2023-11-13 18:38:16 +01:00
|
|
|
cache: { dir: "./tests/__cache__" },
|
2023-11-04 19:31:37 +01:00
|
|
|
environment: "./tests/CustomEnvironment.ts",
|
2023-10-28 05:55:34 +02:00
|
|
|
globals: true,
|
2023-11-03 22:39:33 +01:00
|
|
|
coverage: {
|
2023-11-04 22:07:44 +01:00
|
|
|
provider: "istanbul",
|
2023-11-03 22:39:33 +01:00
|
|
|
reporter: ["text", "html"],
|
2023-11-04 19:37:16 +01:00
|
|
|
reportsDirectory: "./tests/__coverage__",
|
2023-11-04 19:31:37 +01:00
|
|
|
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/**"],
|
2023-11-03 22:39:33 +01:00
|
|
|
},
|
2023-11-07 21:42:32 +01:00
|
|
|
pool: "threads",
|
2023-11-13 18:38:16 +01:00
|
|
|
poolOptions: { threads: { singleThread: true, isolate: false } },
|
2024-05-21 19:59:04 +02:00
|
|
|
alias: { "@spt": path.resolve(__dirname, "src"), "@tests": path.resolve(__dirname, "tests") },
|
2023-11-10 21:16:53 +01:00
|
|
|
},
|
2023-10-28 05:55:34 +02:00
|
|
|
});
|