2024-12-21 17:46:39 -05:00
|
|
|
import { fileURLToPath } from "node:url";
|
2023-10-27 23:55:34 -04:00
|
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
|
|
|
|
export default defineConfig({
|
2024-12-16 17:12:30 -05:00
|
|
|
cacheDir: "./tests/__cache__",
|
2023-10-27 23:55:34 -04:00
|
|
|
test: {
|
|
|
|
name: "spt-server",
|
2023-11-03 17:39:33 -04:00
|
|
|
reporters: ["default"],
|
2023-11-04 18:31:37 +00:00
|
|
|
root: "./",
|
2023-11-07 15:42:32 -05:00
|
|
|
include: ["**/*.{test,spec}.?(c|m)[jt]s?(x)"],
|
2023-11-04 18:31:37 +00:00
|
|
|
environment: "./tests/CustomEnvironment.ts",
|
2023-10-27 23:55:34 -04:00
|
|
|
globals: true,
|
2023-11-03 17:39:33 -04:00
|
|
|
coverage: {
|
2023-11-04 21:07:44 +00:00
|
|
|
provider: "istanbul",
|
2023-11-03 17:39:33 -04:00
|
|
|
reporter: ["text", "html"],
|
2023-11-04 18:37:16 +00:00
|
|
|
reportsDirectory: "./tests/__coverage__",
|
2023-11-04 18:31:37 +00:00
|
|
|
reportOnFailure: true,
|
2023-11-04 18:37:16 +00:00
|
|
|
all: true,
|
|
|
|
include: ["src"],
|
2023-11-10 15:16:53 -05:00
|
|
|
exclude: ["src/models/**", "tests/**"],
|
2023-11-03 17:39:33 -04:00
|
|
|
},
|
2023-11-07 15:42:32 -05:00
|
|
|
pool: "threads",
|
2023-11-13 12:38:16 -05:00
|
|
|
poolOptions: { threads: { singleThread: true, isolate: false } },
|
2024-12-21 17:46:39 -05:00
|
|
|
alias: {
|
|
|
|
"@spt": fileURLToPath(new URL("src", import.meta.url)),
|
|
|
|
"@tests": fileURLToPath(new URL("tests", import.meta.url)),
|
|
|
|
},
|
2023-11-10 15:16:53 -05:00
|
|
|
},
|
2023-10-27 23:55:34 -04:00
|
|
|
});
|