We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
debug
1 parent a9d3923 commit fa9832cCopy full SHA for fa9832c
src/index.js
@@ -85,7 +85,14 @@ export default class MongoDBMemoryServer {
85
86
// Download if not exists mongo binaries in ~/.mongodb-prebuilt
87
// After that startup MongoDB instance
88
- await mongodCli.run();
+ await mongodCli.run().catch(err => {
89
+ if (!this.opts.debug) {
90
+ throw new Error(
91
+ `${err.message}\n\nUse debug option for more info: new MongoMemoryServer({ debug: true })`
92
+ );
93
+ }
94
+ throw err;
95
+ });
96
97
data.mongodCli = mongodCli;
98
data.tmpDir = tmpDir;
0 commit comments