Skip to content

Commit

Permalink
Update MongoDB.md (#7305)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakuni authored and SimenB committed Nov 2, 2018
1 parent 223c3db commit dd6f79b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/MongoDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const {MongoMemoryServer} = require('mongodb-memory-server');

const globalConfigPath = path.join(__dirname, 'globalConfig.json');

const mongoServer = new MongoMemoryServer({
const mongod = new MongoMemoryServer({
autoStart: false,
});

Expand All @@ -37,14 +37,14 @@ module.exports = async () => {

const mongoConfig = {
mongoDBName: 'jest',
mongoUri: await mongoServer.getConnectionString(),
mongoUri: await mongod.getConnectionString(),
};

// Write global config to disk because all tests run in different contexts.
fs.writeFileSync(globalConfigPath, JSON.stringify(mongoConfig));

// Set reference to mongod in order to close the server during teardown.
global.__MONGOD__ = mongoServer;
global.__MONGOD__ = mongod;
};
```

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-22.3/MongoDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {MongoMemoryServer} = require('mongodb-memory-server');

const globalConfigPath = path.join(__dirname, 'globalConfig.json');

const mongoServer = new MongoMemoryServer({
const mongod = new MongoMemoryServer({
autoStart: false,
});

Expand All @@ -38,14 +38,14 @@ module.exports = async () => {

const mongoConfig = {
mongoDBName: 'jest',
mongoUri: await mongoServer.getConnectionString(),
mongoUri: await mongod.getConnectionString(),
};

// Write global config to disk because all tests run in different contexts.
fs.writeFileSync(globalConfigPath, JSON.stringify(mongoConfig));

// Set reference to mongod in order to close the server during teardown.
global.__MONGOD__ = mongoServer;
global.__MONGOD__ = mongod;
};
```

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-23.0/MongoDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {MongoMemoryServer} = require('mongodb-memory-server');

const globalConfigPath = path.join(__dirname, 'globalConfig.json');

const mongoServer = new MongoMemoryServer({
const mongod = new MongoMemoryServer({
autoStart: false,
});

Expand All @@ -38,14 +38,14 @@ module.exports = async () => {

const mongoConfig = {
mongoDBName: 'jest',
mongoUri: await mongoServer.getConnectionString(),
mongoUri: await mongod.getConnectionString(),
};

// Write global config to disk because all tests run in different contexts.
fs.writeFileSync(globalConfigPath, JSON.stringify(mongoConfig));

// Set reference to mongod in order to close the server during teardown.
global.__MONGOD__ = mongoServer;
global.__MONGOD__ = mongod;
};
```

Expand Down
6 changes: 3 additions & 3 deletions website/versioned_docs/version-23.2/MongoDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {MongoMemoryServer} = require('mongodb-memory-server');

const globalConfigPath = path.join(__dirname, 'globalConfig.json');

const mongoServer = new MongoMemoryServer({
const mongod = new MongoMemoryServer({
autoStart: false,
});

Expand All @@ -38,14 +38,14 @@ module.exports = async () => {

const mongoConfig = {
mongoDBName: 'jest',
mongoUri: await mongoServer.getConnectionString(),
mongoUri: await mongod.getConnectionString(),
};

// Write global config to disk because all tests run in different contexts.
fs.writeFileSync(globalConfigPath, JSON.stringify(mongoConfig));

// Set reference to mongod in order to close the server during teardown.
global.__MONGOD__ = mongoServer;
global.__MONGOD__ = mongod;
};
```

Expand Down

0 comments on commit dd6f79b

Please sign in to comment.