From 0b2230af2066a4deb7d417e06a284af58d801f84 Mon Sep 17 00:00:00 2001 From: Hideki Igarashi Date: Tue, 31 May 2022 00:39:17 +0900 Subject: [PATCH] Fix to run tests on non-x64 architecture --- __tests__/installer.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/__tests__/installer.test.ts b/__tests__/installer.test.ts index f3eb8db9e..cacf69f0d 100644 --- a/__tests__/installer.test.ts +++ b/__tests__/installer.test.ts @@ -151,7 +151,14 @@ describe('setup-node', () => { 'mocktoken' ); expect(versions).toBeDefined(); - let match = await tc.findFromManifest(versionSpec, true, versions); + let match = await tc.findFromManifest( + versionSpec, + true, + versions, + // `archFilter` parameter of `findFromManifest` function has a default value of `os.arch()`. + // However, default parameters cannot be replaced by `spyOn` function of Jest. + osm.arch() + ); expect(match).toBeDefined(); expect(match?.version).toBe(expectedVersion); expect((match as any).lts).toBe(expectedLts);