From 5cf8b20cb585b6ee0c9ccd3917c3895c75808411 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Mon, 22 Aug 2022 11:19:05 +0200 Subject: [PATCH] test(MongoBinaryDownloadUrl): add tests for "translateArch" aside from "ia32" --- .../src/util/__tests__/MongoBinaryDownloadUrl.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts b/packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts index b33e1e2b8..0c8b9692c 100644 --- a/packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts +++ b/packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts @@ -1473,6 +1473,16 @@ describe('MongoBinaryDownloadUrl', () => { expect(err.message).toMatchSnapshot(); } }); + + it('should translate "x64" and "x86_64" to "x86_64"', () => { + expect(MongoBinaryDownloadUrl.translateArch('x64', 'linux')).toStrictEqual('x86_64'); + expect(MongoBinaryDownloadUrl.translateArch('x86_64', 'linux')).toStrictEqual('x86_64'); + }); + + it('should translate "arm64" and "aarch64" to "aarch64"', () => { + expect(MongoBinaryDownloadUrl.translateArch('arm64', 'linux')).toStrictEqual('aarch64'); + expect(MongoBinaryDownloadUrl.translateArch('aarch64', 'linux')).toStrictEqual('aarch64'); + }); }); describe('translatePlatform()', () => {