add missing shutdown hooks in unit tests
This commit is contained in:
parent
4db8d0b9ed
commit
b8e3f545c0
10 changed files with 55 additions and 12 deletions
|
|
@ -6,7 +6,7 @@ process.env.NODE_ENV = 'test';
|
|||
|
||||
import * as assert from 'assert';
|
||||
import { generateKeyPair } from 'crypto';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { jest } from '@jest/globals';
|
||||
|
||||
import { NoOpCacheService } from '../misc/noOpCaches.js';
|
||||
|
|
@ -94,6 +94,7 @@ async function createRandomRemoteUser(
|
|||
}
|
||||
|
||||
describe('ActivityPub', () => {
|
||||
let app: TestingModule;
|
||||
let userProfilesRepository: UserProfilesRepository;
|
||||
let imageService: ApImageService;
|
||||
let noteService: ApNoteService;
|
||||
|
|
@ -147,7 +148,7 @@ describe('ActivityPub', () => {
|
|||
}
|
||||
|
||||
beforeAll(async () => {
|
||||
const app = await Test.createTestingModule({
|
||||
app = await Test.createTestingModule({
|
||||
imports: [GlobalModule, CoreModule],
|
||||
})
|
||||
.overrideProvider(DownloadService).useValue({
|
||||
|
|
@ -187,6 +188,10 @@ describe('ActivityPub', () => {
|
|||
resolver.clear();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await app.close();
|
||||
});
|
||||
|
||||
describe('Parse minimum object', () => {
|
||||
const actor = createRandomActor();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue