call app.init, app.enableShutdownHooks, and app.close in more tests
This commit is contained in:
parent
7d6732bf96
commit
92892338f3
11 changed files with 66 additions and 53 deletions
|
|
@ -27,20 +27,22 @@ describe('DriveService', () => {
|
|||
beforeAll(async () => {
|
||||
app = await Test.createTestingModule({
|
||||
imports: [GlobalModule, CoreModule],
|
||||
providers: [DriveService],
|
||||
}).compile();
|
||||
app.enableShutdownHooks();
|
||||
driveService = app.get<DriveService>(DriveService);
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
s3Mock.reset();
|
||||
await app.init();
|
||||
app.enableShutdownHooks();
|
||||
|
||||
driveService = app.get<DriveService>(DriveService);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
s3Mock.reset();
|
||||
});
|
||||
|
||||
describe('Object storage', () => {
|
||||
test('delete a file', async () => {
|
||||
s3Mock.on(DeleteObjectCommand)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue