test setup

This commit is contained in:
Aashish-Upadhyay-101
2023-03-16 17:34:11 +05:45
parent 3d818f953d
commit 46f2b7a3f8
4 changed files with 20 additions and 11 deletions
+11
View File
@@ -0,0 +1,11 @@
import { beforeAll, afterAll } from '@jest/globals';
import { DatabaseService } from './src/services';
beforeAll(async () => {
const mongoURL = process.env.MONGO_URL!;
await DatabaseService.initDatabase(mongoURL);
});
afterAll(async () => {
await DatabaseService.closeDatabase();
});