Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = class MongoEnvironment extends TestEnvironment {
globalConfigPath: string;
constructor(config: JestEnvironmentConfig, context: EnvironmentContext) {
super(config, context);
this.globalConfigPath = pathJoin(config.projectConfig.rootDir, 'globalConfig.json');
this.globalConfigPath = pathJoin(config.globalConfig.rootDir, 'globalConfig.json');
}

async setup() {
Expand Down
2 changes: 1 addition & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const mongo: Mongo = isReplSet
? new MongoMemoryReplSet(mongoMemoryServerOptions)
: new MongoMemoryServer(mongoMemoryServerOptions);

module.exports = async (config: JestEnvironmentConfig['projectConfig']) => {
module.exports = async (config: JestEnvironmentConfig['globalConfig']) => {
const globalConfigPath = join(config.rootDir, 'globalConfig.json');

const options = getMongodbMemoryOptions();
Expand Down
2 changes: 1 addition & 1 deletion src/teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {JestEnvironmentConfig} from '@jest/environment';

const debug = require('debug')('jest-mongodb:teardown');

module.exports = async function (config: JestEnvironmentConfig['projectConfig']) {
module.exports = async function (config: JestEnvironmentConfig['globalConfig']) {
const globalConfigPath = join(config.rootDir, 'globalConfig.json');

debug('Teardown mongod');
Expand Down