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:
parent
6f11e3de34
commit
1f0318e66d
16
project/tests/Setup.test.ts
Normal file
16
project/tests/Setup.test.ts
Normal 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";
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user