1
0
Fork 0
mirror of https://github.com/actions/setup-node.git synced 2024-09-19 16:06:43 +00:00

Fix to run tests on non-x64 architecture

This commit is contained in:
Hideki Igarashi 2023-03-22 11:08:23 +09:00
parent a4fcaaf314
commit b858c04541
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 72C038EA82D16065

View file

@ -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);