Skip to content

Commit

Permalink
Merge pull request #331 from noseworthy/prep-for-jest-28
Browse files Browse the repository at this point in the history
  • Loading branch information
vladgolubev committed Mar 7, 2022
2 parents a94d84e + b30747c commit 2379a0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion environment.js
Expand Up @@ -13,11 +13,13 @@ const globalConfigPath = path.join(cwd, 'globalConfig.json');
const options = getMongodbMemoryOptions();
const isReplSet = Boolean(options.replSet);

const TestEnvironment = NodeEnvironment.default ? NodeEnvironment.default : NodeEnvironment;

debug(`isReplSet`, isReplSet);

let mongo = isReplSet ? new MongoMemoryReplSet(options) : new MongoMemoryServer(options);

module.exports = class MongoEnvironment extends NodeEnvironment {
module.exports = class MongoEnvironment extends TestEnvironment {
constructor(config, context) {
super(config, context);
}
Expand Down

0 comments on commit 2379a0d

Please sign in to comment.