diff --git a/.gitignore b/.gitignore index dc7c71cf..a1a61424 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,8 @@ project/Aki_Data/ project/tmp/ project/docs/ project/types/ +project/tests/__cache__/ project/tests/__coverage__/ -project/__coverage__/ project/src/__coverage__/ ## visual studio @@ -42,4 +42,4 @@ desktop.ini #jest coverage -.scannerwork/ \ No newline at end of file +.scannerwork/ diff --git a/project/tests/Setup.test.ts b/project/tests/Setup.test.ts deleted file mode 100644 index c1bcef0c..00000000 --- a/project/tests/Setup.test.ts +++ /dev/null @@ -1,17 +0,0 @@ -//Controllers -import "@tests/controllers/InsuranceController.test"; - -//Generators -import "@tests/generators/BotLevelGenerator.test"; -import "@tests/generators/BotGenerator.test"; - -//Helpers -import "@tests/helpers/BotHelper.test"; -import "@tests/helpers/HandbookHelper.test"; -import "@tests/helpers/InRaidHelper.test"; -import "@tests/helpers/ItemHelper.test"; - -//Services -import "@tests/services/ItemBaseClassService.test"; -import "@tests/services/PaymentService.test"; -import "@tests/services/PlayerService.test"; \ No newline at end of file diff --git a/project/vitest.config.ts b/project/vitest.config.ts index 2d1aabe3..965720b9 100644 --- a/project/vitest.config.ts +++ b/project/vitest.config.ts @@ -8,8 +8,10 @@ export default defineConfig({ api: 51204, reporters: ["default"], root: "./", - include: ["tests/Setup.test.ts"], - cache: false, + include: ["**/*.{test,spec}.?(c|m)[jt]s?(x)"], + cache: { + dir: "./tests/__cache__" + }, environment: "./tests/CustomEnvironment.ts", globals: true, coverage: { @@ -21,6 +23,13 @@ export default defineConfig({ include: ["src"], exclude: ["src/models/**", "tests/**"] }, + pool: "threads", + poolOptions: { + threads: { + singleThread: true, + isolate: false + } + }, alias: { "@spt-aki": path.resolve(__dirname, "src"), "@tests": path.resolve(__dirname, "tests")