Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
uidp committed Jun 11, 2024
1 parent 41cef59 commit a0fd505
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MongoMemoryDatabaseModule } from '@infra/database';
import { MikroORM } from '@mikro-orm/core';
import { ObjectId } from '@mikro-orm/mongodb';
import { EntityManager, ObjectId } from '@mikro-orm/mongodb';
import { Test, TestingModule } from '@nestjs/testing';
import { createCollections } from '@shared/testing';
import { DatabaseManagementService } from './database-management.service';

const randomChars = () => new ObjectId().toHexString();
Expand All @@ -17,6 +18,9 @@ describe('DatabaseManagementService', () => {

service = module.get(DatabaseManagementService);
orm = module.get(MikroORM);

const em = module.get(EntityManager);
await createCollections(em);
});

afterAll(async () => {
Expand Down

0 comments on commit a0fd505

Please sign in to comment.