beforeEach → beforeAll
This commit is contained in:
parent
8850ea53ca
commit
2960c2069e
|
@ -79,7 +79,7 @@ describe('UserSuspendService', () => {
|
||||||
return following;
|
return following;
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeAll(async () => {
|
||||||
app = await Test.createTestingModule({
|
app = await Test.createTestingModule({
|
||||||
imports: [GlobalModule],
|
imports: [GlobalModule],
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -131,13 +131,10 @@ describe('UserSuspendService', () => {
|
||||||
globalEventService = app.get<GlobalEventService>(GlobalEventService) as jest.Mocked<GlobalEventService>;
|
globalEventService = app.get<GlobalEventService>(GlobalEventService) as jest.Mocked<GlobalEventService>;
|
||||||
apRendererService = app.get<ApRendererService>(ApRendererService) as jest.Mocked<ApRendererService>;
|
apRendererService = app.get<ApRendererService>(ApRendererService) as jest.Mocked<ApRendererService>;
|
||||||
moderationLogService = app.get<ModerationLogService>(ModerationLogService) as jest.Mocked<ModerationLogService>;
|
moderationLogService = app.get<ModerationLogService>(ModerationLogService) as jest.Mocked<ModerationLogService>;
|
||||||
|
|
||||||
// Reset mocks
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
beforeEach(() => {
|
||||||
await app.close();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('suspend', () => {
|
describe('suspend', () => {
|
||||||
|
|
Loading…
Reference in New Issue