Create container once before all tests

- Doesn't recreate the container for each test file, only loads the database once at the start, makes it much faster.
- Every test file should be imported in `Setup.test.ts` in order for it to work.
This commit is contained in:
TheSparta 2023-11-05 16:59:54 +00:00
parent 6f11e3de34
commit 1f0318e66d
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,16 @@
//Controllers
import "@tests/controllers/InsuranceController.test";
//Generators
import "@tests/generators/BotLevelGenerator.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";

View File

@ -8,6 +8,7 @@ export default defineConfig({
api: 51204,
reporters: ["default"],
root: "./",
include: ["tests/Setup.test.ts"],
cache: false,
environment: "./tests/CustomEnvironment.ts",
globals: true,