Skip to content

Commit 88e9460

Browse files
committed
feat(MongoMemoryServer): start mongod if was requested instance data for not running DB
1 parent 8829f74 commit 88e9460

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/MongoMemoryServer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ export default class MongoMemoryServer {
161161
}
162162

163163
async getInstanceData(): Promise<MongoInstanceDataT> {
164+
if (!this.runningInstance) {
165+
await this.start();
166+
}
164167
if (this.runningInstance) {
165168
return this.runningInstance;
166169
}

0 commit comments

Comments
 (0)