Skip to content

Commit

Permalink
Fix to run tests on non-x64 architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
ganta committed May 30, 2022
1 parent ed1a46e commit 0b2230a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion __tests__/installer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0b2230a

Please sign in to comment.