beforeEach → beforeAll

This commit is contained in:
tamaina 2025-07-20 23:28:55 +09:00
parent 8850ea53ca
commit 2960c2069e
1 changed files with 3 additions and 6 deletions

View File

@ -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', () => {