mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 07:28:09 -05:00
jest test basic setup
This commit is contained in:
@@ -5,5 +5,5 @@ export default {
|
||||
modulePaths: ['<rootDir>/src'],
|
||||
testMatch: ['<rootDir>/tests/**/*.test.ts'],
|
||||
setupFiles: ['<rootDir>/test-resources/env-vars.js'],
|
||||
setupFilesAfterEnv: ['<rootDir>/setupTests.ts']
|
||||
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.ts']
|
||||
};
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
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();
|
||||
});
|
||||
Reference in New Issue
Block a user