remove inline providers from unit tests

This commit is contained in:
Hazelnoot 2025-10-01 11:56:16 -04:00
parent 92892338f3
commit a3e969625d
6 changed files with 33 additions and 76 deletions

View file

@ -14,7 +14,7 @@ import {
UploadPartCommand,
} from '@aws-sdk/client-s3';
import { mockClient } from 'aws-sdk-client-mock';
import { FakeInternalEventService } from '../misc/FakeInternalEventService.js';
import { MockInternalEventService } from '../misc/MockInternalEventService.js';
import type { TestingModule } from '@nestjs/testing';
import { GlobalModule } from '@/GlobalModule.js';
import { CoreModule } from '@/core/CoreModule.js';
@ -33,9 +33,8 @@ describe('S3Service', () => {
beforeAll(async () => {
app = await Test.createTestingModule({
imports: [GlobalModule, CoreModule],
providers: [S3Service],
})
.overrideProvider(InternalEventService).useClass(FakeInternalEventService)
.overrideProvider(InternalEventService).useClass(MockInternalEventService)
.compile();
await app.init();