mirror of
https://github.com/actions/setup-node.git
synced 2025-04-23 01:36:27 +00:00
apply prettier
This commit is contained in:
parent
abfc09feda
commit
9d28777916
2 changed files with 34 additions and 29 deletions
|
@ -911,7 +911,9 @@ describe('setup-node', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('latest alias syntax', () => {
|
describe('latest alias syntax', () => {
|
||||||
it.each(['latest', 'current', 'node'])('download the %s version if alias is provided', async (inputVersion) => {
|
it.each(['latest', 'current', 'node'])(
|
||||||
|
'download the %s version if alias is provided',
|
||||||
|
async inputVersion => {
|
||||||
// Arrange
|
// Arrange
|
||||||
inputs['node-version'] = inputVersion;
|
inputs['node-version'] = inputVersion;
|
||||||
|
|
||||||
|
@ -935,18 +937,17 @@ describe('setup-node', () => {
|
||||||
`Attempting to download ${inputVersion}...`
|
`Attempting to download ${inputVersion}...`
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(logSpy).toHaveBeenCalledWith(
|
expect(logSpy).toHaveBeenCalledWith('Unable to download manifest');
|
||||||
'Unable to download manifest'
|
|
||||||
);
|
expect(logSpy).toHaveBeenCalledWith('getting latest node version...');
|
||||||
|
|
||||||
expect(logSpy).toHaveBeenCalledWith(
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
'getting latest node version...'
|
`Acquiring ${expectedVersion.version.substring(
|
||||||
|
1,
|
||||||
|
expectedVersion.version.length
|
||||||
|
)} - ${os.arch} from ${expectedUrl}`
|
||||||
);
|
);
|
||||||
|
}
|
||||||
expect(logSpy).toHaveBeenCalledWith(
|
|
||||||
`Acquiring ${expectedVersion.version.substring(1, expectedVersion.version.length)} - ${os.arch} from ${expectedUrl}`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -374,7 +374,11 @@ async function queryDistForMatch(
|
||||||
let versions: string[] = [];
|
let versions: string[] = [];
|
||||||
let nodeVersions = await installer.getVersionsFromDist();
|
let nodeVersions = await installer.getVersionsFromDist();
|
||||||
|
|
||||||
if (versionSpec === 'current' || versionSpec === 'latest' || versionSpec === 'node') {
|
if (
|
||||||
|
versionSpec === 'current' ||
|
||||||
|
versionSpec === 'latest' ||
|
||||||
|
versionSpec === 'node'
|
||||||
|
) {
|
||||||
core.info(`getting latest node version...`);
|
core.info(`getting latest node version...`);
|
||||||
return nodeVersions[0].version;
|
return nodeVersions[0].version;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue