Skip to content

Commit 0452cbd

Browse files
chmacnodkz
authored andcommitted
fix: URL for macos change for 4.2.0
1 parent 2e20076 commit 0452cbd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ export default class MongoBinaryDownloadUrl {
6666
) {
6767
name += '-ssl';
6868
}
69+
if (this.version.indexOf('4.2') === 0) {
70+
name = `mongodb-macos`;
71+
}
6972
name += `-${this.arch}`;
7073
name += `-${this.version}.tgz`;
7174
return name;

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ import MongoBinaryDownloadUrl from '../MongoBinaryDownloadUrl';
33
describe('MongoBinaryDownloadUrl', () => {
44
describe('getDownloadUrl()', () => {
55
describe('for mac', () => {
6+
it('4.2', async () => {
7+
const du = new MongoBinaryDownloadUrl({
8+
platform: 'darwin',
9+
arch: 'x64',
10+
version: '4.2.0',
11+
});
12+
expect(await du.getDownloadUrl()).toBe(
13+
'https://fastdl.mongodb.org/osx/mongodb-macos-x86_64-4.2.0.tgz'
14+
);
15+
});
16+
617
it('above 3.0', async () => {
718
const du = new MongoBinaryDownloadUrl({
819
platform: 'darwin',

0 commit comments

Comments
 (0)