2023-11-02 15:58:16 +00:00
|
|
|
import path from "node:path";
|
2023-10-27 23:55:34 -04:00
|
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
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-13 12:38:16 -05:00
|
|
|
cache: { dir: "./tests/__cache__" },
|
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-05-21 17:59:04 +00:00
|
|
|
alias: { "@spt": path.resolve(__dirname, "src"), "@tests": path.resolve(__dirname, "tests") },
|
2023-11-10 15:16:53 -05:00
|
|
|
},
|
2023-10-27 23:55:34 -04:00
|
|
|
});
|