From b858c04541441f645fabd381458920c1791b37ec Mon Sep 17 00:00:00 2001 From: Hideki Igarashi Date: Wed, 22 Mar 2023 11:08:23 +0900 Subject: [PATCH] Fix to run tests on non-x64 architecture --- __tests__/official-installer.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/__tests__/official-installer.test.ts b/__tests__/official-installer.test.ts index 474fb5b9..ed86a901 100644 --- a/__tests__/official-installer.test.ts +++ b/__tests__/official-installer.test.ts @@ -162,7 +162,14 @@ describe('setup-node', () => { 'mocktoken' ); expect(versions).toBeDefined(); - const match = await tc.findFromManifest(versionSpec, true, versions); + const 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);