Skip to content

Commit

Permalink
fix(testing-mongoose): add missing await when creating mongo connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Sep 26, 2023
1 parent c08b8a8 commit 5855a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/orm/testing-mongoose/src/TestMongooseContext.ts
Expand Up @@ -14,10 +14,10 @@ export class TestMongooseContext extends PlatformTest {
return global.__MONGOD__;
}

static install({replicaSet, ...opts}: {replicaSet?: boolean} & Record<string, any> = {}) {
static async install({replicaSet, ...opts}: {replicaSet?: boolean} & Record<string, any> = {}) {
if (!TestMongooseContext.getMongo()) {
// @ts-ignore
global.__MONGOD__ = (replicaSet ? MongoMemoryReplSet : MongoMemoryServer).create({
global.__MONGOD__ = await (replicaSet ? MongoMemoryReplSet : MongoMemoryServer).create({
...opts,
binary: {
...(opts.binary || {}),
Expand Down

0 comments on commit 5855a6a

Please sign in to comment.