updated test cases

This commit is contained in:
Aparna Jyothi 2025-02-24 12:40:37 +05:30
parent e5561a4d32
commit 7a5031f96f
9 changed files with 172 additions and 272 deletions

View file

@ -7,7 +7,11 @@ import * as path from 'path';
import {restoreCache} from './cache-restore';
import {isCacheFeatureAvailable} from './cache-utils';
import {getNodejsDistribution} from './distributions/installer-factory';
import {getNodeVersionFromFile, printEnvDetailsAndSetOutput} from './util';
import {
getNodeVersionFromFile,
printEnvDetailsAndSetOutput,
validateMirrorURL
} from './util';
import {State} from './constants';
export async function run() {
@ -33,12 +37,8 @@ export async function run() {
arch = os.arch();
}
const mirrorURL = core.getInput('mirror-url');
if (mirrorURL === ' ' && mirrorURL === undefined) {
core.error(
'Mirror URL is emptry or undefined. The default mirror URL will be used.'
);
}
const mirrorurl = core.getInput('mirror-url');
const mirrorURL = validateMirrorURL(mirrorurl);
if (version) {
const token = core.getInput('token');
@ -121,6 +121,3 @@ function resolveVersionInput(): string {
return version;
}
export function setupNodeJs(mirrorURL: string) {
throw new Error('Function not implemented.');
}