Skip to content

Commit 328c201

Browse files
committed
test(MongoInstance): add run test for 8.2.0
1 parent f7531f3 commit 328c201

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/mongodb-memory-server-core/src/__tests__/testUtils/globalSetup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export = async function globalSetup(): Promise<void> {
1414
'6.0.25',
1515
'7.0.24',
1616
'8.0.14',
17+
'8.2.1',
1718
];
1819
// Ensure all required versions are downloaded for tests
1920
for (const version of versions) {

packages/mongodb-memory-server-core/src/util/__tests__/MongoInstance.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,17 @@ describe('MongodbInstance', () => {
280280
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
281281
await mongod.stop();
282282
});
283+
284+
it('should work with mongodb 8.2', async () => {
285+
const gotPort = await getFreePort(27445);
286+
const mongod = await MongodbInstance.create({
287+
// this works without problems, because no explicit storage-engine is given, so mongodb automatically chooses wiredTiger
288+
instance: { port: gotPort, dbPath: tmpDir },
289+
binary: { version: '8.2.1' },
290+
});
291+
expect(mongod.mongodProcess!.pid).toBeGreaterThan(0);
292+
await mongod.stop();
293+
});
283294
});
284295

285296
it('"kill" should not call "killProcess" if no childProcesses are not running', async () => {

0 commit comments

Comments
 (0)