2023-10-28 05:55:34 +02:00
|
|
|
/* eslint-disable @typescript-eslint/naming-convention */
|
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
|
|
|
api: 51204,
|
|
|
|
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)"],
|
|
|
|
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-04 22:07:44 +01:00
|
|
|
exclude: ["src/models/**", "tests/**"]
|
2023-11-03 22:39:33 +01:00
|
|
|
},
|
2023-11-07 21:42:32 +01:00
|
|
|
pool: "threads",
|
|
|
|
poolOptions: {
|
|
|
|
threads: {
|
|
|
|
singleThread: true,
|
|
|
|
isolate: false
|
|
|
|
}
|
|
|
|
},
|
2023-10-28 05:55:34 +02:00
|
|
|
alias: {
|
|
|
|
"@spt-aki": path.resolve(__dirname, "src"),
|
|
|
|
"@tests": path.resolve(__dirname, "tests")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|