We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
getDbName()
1 parent 0ad0b97 commit bbdaef8Copy full SHA for bbdaef8
README.md
@@ -33,6 +33,7 @@ const mongod = new MongodbMemoryServer();
33
const uri = await mongod.getConnectionString();
34
const port = await mongod.getPort();
35
const dbPath = await mongod.getDbPath();
36
+const dbName = await mongoServer.getDbName();
37
38
// some code
39
src/MongoMemoryServer.js
@@ -198,4 +198,9 @@ export default class MongoMemoryServer {
198
const { dbPath } = (await this.getInstanceData(): MongoInstanceDataT);
199
return dbPath;
200
}
201
+
202
+ async getDbName(): Promise<string> {
203
+ const { dbName } = (await this.getInstanceData(): MongoInstanceDataT);
204
+ return dbName;
205
+ }
206
0 commit comments