Skip to content

Commit 742bead

Browse files
BankyKmitlnodkz
authored andcommitted
fix: change default mongodb version to latest (#70)
1 parent 9a46010 commit 742bead

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const mongod = new MongodbMemoryServer({
5353
debug?: boolean, // by default false
5454
},
5555
binary: {
56-
version?: string, // by default '3.4.4'
56+
version?: string, // by default 'latest'
5757
downloadDir?: string, // by default %HOME/.mongodb-binaries
5858
platform?: string, // by default os.platform()
5959
arch?: string, // by default os.arch()

src/util/MongoBinary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class MongoBinary {
2626
downloadDir = path.resolve(os.homedir(), '.mongodb-binaries'),
2727
platform = os.platform(),
2828
arch = os.arch(),
29-
version = '3.4.4',
29+
version = 'latest',
3030
} = opts;
3131

3232
let debug;

src/util/__tests__/MongoInstance-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('MongoInstance', () => {
3838
it('should start instance on port 27333', async () => {
3939
const mongod = await MongoInstance.run({
4040
instance: { port: 27333, dbPath: tmpDir.name },
41-
binary: { version: '3.4.4' },
41+
binary: { version: 'latest' },
4242
});
4343

4444
expect(mongod.getPid()).toBeGreaterThan(0);
@@ -49,13 +49,13 @@ describe('MongoInstance', () => {
4949
it('should throw error if port is busy', async () => {
5050
const mongod = await MongoInstance.run({
5151
instance: { port: 27444, dbPath: tmpDir.name },
52-
binary: { version: '3.4.4' },
52+
binary: { version: 'latest' },
5353
});
5454

5555
await expect(
5656
MongoInstance.run({
5757
instance: { port: 27444, dbPath: tmpDir.name },
58-
binary: { version: '3.4.4' },
58+
binary: { version: 'latest' },
5959
})
6060
).rejects.toBeDefined();
6161

@@ -65,7 +65,7 @@ describe('MongoInstance', () => {
6565
it('should await while mongo is killed', async () => {
6666
const mongod = await MongoInstance.run({
6767
instance: { port: 27445, dbPath: tmpDir.name },
68-
binary: { version: '3.4.4' },
68+
binary: { version: 'latest' },
6969
});
7070
const pid: any = mongod.getPid();
7171
expect(pid).toBeGreaterThan(0);

0 commit comments

Comments
 (0)