mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-11-05 19:45:48 +00:00
Fix to run tests on non-x64 architecture
This commit is contained in:
parent
a4fcaaf314
commit
b858c04541
1 changed files with 8 additions and 1 deletions
|
@ -162,7 +162,14 @@ describe('setup-node', () => {
|
||||||
'mocktoken'
|
'mocktoken'
|
||||||
);
|
);
|
||||||
expect(versions).toBeDefined();
|
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).toBeDefined();
|
||||||
expect(match?.version).toBe(expectedVersion);
|
expect(match?.version).toBe(expectedVersion);
|
||||||
expect((match as any).lts).toBe(expectedLts);
|
expect((match as any).lts).toBe(expectedLts);
|
||||||
|
|
Loading…
Reference in a new issue