mirror of
https://github.com/actions/setup-node.git
synced 2025-06-30 06:33:48 +00:00
Expose the ability to select different architectures
This commit is contained in:
parent
e565252a9d
commit
3d0361d465
7 changed files with 84 additions and 35 deletions
|
@ -120,4 +120,30 @@ describe('installer tests', () => {
|
|||
await installer.getNode('252');
|
||||
await installer.getNode('252.0');
|
||||
});
|
||||
|
||||
it('Acquires specified x86 version of node if no matching version is installed', async () => {
|
||||
const arch = 'x86';
|
||||
await installer.getNode('8.8.1', arch);
|
||||
const nodeDir = path.join(toolDir, 'node', '8.8.1', arch);
|
||||
|
||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
||||
if (IS_WINDOWS) {
|
||||
expect(fs.existsSync(path.join(nodeDir, 'node.exe'))).toBe(true);
|
||||
} else {
|
||||
expect(fs.existsSync(path.join(nodeDir, 'bin', 'node'))).toBe(true);
|
||||
}
|
||||
}, 100000);
|
||||
|
||||
it('Acquires specified x64 version of node if no matching version is installed', async () => {
|
||||
const arch = 'x64';
|
||||
await installer.getNode('8.8.1', arch);
|
||||
const nodeDir = path.join(toolDir, 'node', '8.8.1', arch);
|
||||
|
||||
expect(fs.existsSync(`${nodeDir}.complete`)).toBe(true);
|
||||
if (IS_WINDOWS) {
|
||||
expect(fs.existsSync(path.join(nodeDir, 'node.exe'))).toBe(true);
|
||||
} else {
|
||||
expect(fs.existsSync(path.join(nodeDir, 'bin', 'node'))).toBe(true);
|
||||
}
|
||||
}, 100000);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue