diff --git a/apps/server/src/modules/tldraw/repo/tldraw.repo.spec.ts b/apps/server/src/modules/tldraw/repo/tldraw.repo.spec.ts index 86c0ce7345a..9e12d64d782 100644 --- a/apps/server/src/modules/tldraw/repo/tldraw.repo.spec.ts +++ b/apps/server/src/modules/tldraw/repo/tldraw.repo.spec.ts @@ -2,12 +2,10 @@ import { EntityManager } from '@mikro-orm/mongodb'; import { Test, TestingModule } from '@nestjs/testing'; import { cleanupCollections } from '@shared/testing'; import { MikroORM } from '@mikro-orm/core'; -import { ConfigModule } from '@nestjs/config'; -import { createConfigModuleOptions } from '@src/config'; -import { tldrawEntityFactory, tldrawTestConfig } from '../testing'; +import { MongoMemoryDatabaseModule } from '@src/infra/database'; +import { tldrawEntityFactory } from '../testing'; import { TldrawDrawing } from '../entities'; import { TldrawRepo } from './tldraw.repo'; -import { TldrawWsTestModule } from '../tldraw-ws-test.module'; describe('TldrawRepo', () => { let testingModule: TestingModule; @@ -17,7 +15,8 @@ describe('TldrawRepo', () => { beforeAll(async () => { testingModule = await Test.createTestingModule({ - imports: [TldrawWsTestModule, ConfigModule.forRoot(createConfigModuleOptions(tldrawTestConfig))], + imports: [MongoMemoryDatabaseModule.forRoot({ entities: [TldrawDrawing] })], + providers: [TldrawRepo], }).compile(); repo = testingModule.get(TldrawRepo);