mirror of
https://github.com/actions/setup-node.git
synced 2026-02-23 07:04:42 +08:00
updated test cases
This commit is contained in:
@@ -10,17 +10,7 @@ export default class NightlyNodejs extends BasePrereleaseNodejs {
|
||||
|
||||
protected getDistributionUrl(): string {
|
||||
if (this.nodeInfo.mirrorURL) {
|
||||
if (this.nodeInfo.mirrorURL != '') {
|
||||
return this.nodeInfo.mirrorURL;
|
||||
} else {
|
||||
if (this.nodeInfo.mirrorURL === '') {
|
||||
throw new Error(
|
||||
'Mirror URL is empty. Please provide a valid mirror URL.'
|
||||
);
|
||||
} else {
|
||||
throw new Error('Mirror URL is not a valid');
|
||||
}
|
||||
}
|
||||
return this.nodeInfo.mirrorURL;
|
||||
} else {
|
||||
return 'https://nodejs.org/download/nightly';
|
||||
}
|
||||
|
||||
@@ -7,17 +7,7 @@ export default class RcBuild extends BaseDistribution {
|
||||
}
|
||||
protected getDistributionUrl(): string {
|
||||
if (this.nodeInfo.mirrorURL) {
|
||||
if (this.nodeInfo.mirrorURL != '') {
|
||||
return this.nodeInfo.mirrorURL;
|
||||
} else {
|
||||
if (this.nodeInfo.mirrorURL === '') {
|
||||
throw new Error(
|
||||
'Mirror URL is empty. Please provide a valid mirror URL.'
|
||||
);
|
||||
} else {
|
||||
throw new Error('Mirror URL is not a valid');
|
||||
}
|
||||
}
|
||||
return this.nodeInfo.mirrorURL;
|
||||
} else {
|
||||
return 'https://nodejs.org/download/rc';
|
||||
}
|
||||
|
||||
@@ -8,17 +8,7 @@ export default class CanaryBuild extends BasePrereleaseNodejs {
|
||||
|
||||
protected getDistributionUrl(): string {
|
||||
if (this.nodeInfo.mirrorURL) {
|
||||
if (this.nodeInfo.mirrorURL != '') {
|
||||
return this.nodeInfo.mirrorURL;
|
||||
} else {
|
||||
if (this.nodeInfo.mirrorURL === '') {
|
||||
throw new Error(
|
||||
'Mirror URL is empty. Please provide a valid mirror URL.'
|
||||
);
|
||||
} else {
|
||||
throw new Error('Mirror URL is not a valid');
|
||||
}
|
||||
}
|
||||
return this.nodeInfo.mirrorURL;
|
||||
} else {
|
||||
return 'https://nodejs.org/download/v8-canary';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user