Skip to content

Commit cff62cb

Browse files
committed
Fix tests
1 parent dcc68cd commit cff62cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Contexts/Shared/infrastructure/MongoClientFactory.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('Create a client', () => {
66
let client: MongoClient;
77

88
beforeEach(async () => {
9-
client = await factory.createClient('test');
9+
client = await factory.createClient('test', { url: 'mongodb://localhost:27017/mooc-backend-test' });
1010
});
1111

1212
afterEach(async () => {
@@ -19,15 +19,15 @@ describe('Create a client', () => {
1919
});
2020

2121
it('creates a new client if it does not exist a client with the given name', async () => {
22-
const newClient = await factory.createClient('test2');
22+
const newClient = await factory.createClient('test2', { url: 'mongodb://localhost:27017/mooc-backend-test' });
2323

2424
expect(newClient).not.toBe(client);
2525

2626
await newClient.close();
2727
});
2828

2929
it('returns a client if it already exists', async () => {
30-
const newClient = await factory.createClient('test');
30+
const newClient = await factory.createClient('test', { url: 'mongodb://localhost:27017/mooc-backend-test' });
3131

3232
expect(newClient).toBe(client);
3333

0 commit comments

Comments
 (0)