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
|
|
@ -149,6 +149,9 @@ describe('AbuseReportNotificationService', () => {
|
|||
})
|
||||
.compile();
|
||||
|
||||
await app.init();
|
||||
app.enableShutdownHooks();
|
||||
|
||||
usersRepository = app.get(DI.usersRepository);
|
||||
userProfilesRepository = app.get(DI.userProfilesRepository);
|
||||
systemWebhooksRepository = app.get(DI.systemWebhooksRepository);
|
||||
|
|
@ -159,8 +162,10 @@ describe('AbuseReportNotificationService', () => {
|
|||
roleService = app.get(RoleService) as jest.Mocked<RoleService>;
|
||||
emailService = app.get<EmailService>(EmailService) as jest.Mocked<EmailService>;
|
||||
webhookService = app.get<SystemWebhookService>(SystemWebhookService) as jest.Mocked<SystemWebhookService>;
|
||||
});
|
||||
|
||||
app.enableShutdownHooks();
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
@ -185,10 +190,6 @@ describe('AbuseReportNotificationService', () => {
|
|||
await abuseReportNotificationRecipientRepository.delete({});
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
|
||||
describe('createRecipient', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue