mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 05:19:11 +08:00 
			
		
		
		
	resolve SymbolicLink (#809)
This commit is contained in:
		@@ -23,8 +23,10 @@ describe('cache-utils', () => {
 | 
			
		||||
  let isFeatureAvailable: jest.SpyInstance;
 | 
			
		||||
  let info: jest.SpyInstance;
 | 
			
		||||
  let warningSpy: jest.SpyInstance;
 | 
			
		||||
  let fsRealPathSyncSpy: jest.SpyInstance;
 | 
			
		||||
 | 
			
		||||
  beforeEach(() => {
 | 
			
		||||
    console.log('::stop-commands::stoptoken');
 | 
			
		||||
    process.env['GITHUB_WORKSPACE'] = path.join(__dirname, 'data');
 | 
			
		||||
    debugSpy = jest.spyOn(core, 'debug');
 | 
			
		||||
    debugSpy.mockImplementation(msg => {});
 | 
			
		||||
@@ -35,8 +37,24 @@ describe('cache-utils', () => {
 | 
			
		||||
    isFeatureAvailable = jest.spyOn(cache, 'isFeatureAvailable');
 | 
			
		||||
 | 
			
		||||
    getCommandOutputSpy = jest.spyOn(utils, 'getCommandOutput');
 | 
			
		||||
 | 
			
		||||
    fsRealPathSyncSpy = jest.spyOn(fs, 'realpathSync');
 | 
			
		||||
    fsRealPathSyncSpy.mockImplementation(dirName => {
 | 
			
		||||
      return dirName;
 | 
			
		||||
    });
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  afterEach(() => {
 | 
			
		||||
    jest.resetAllMocks();
 | 
			
		||||
    jest.clearAllMocks();
 | 
			
		||||
    //jest.restoreAllMocks();
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  afterAll(async () => {
 | 
			
		||||
    console.log('::stoptoken::');
 | 
			
		||||
    jest.restoreAllMocks();
 | 
			
		||||
  }, 100000);
 | 
			
		||||
 | 
			
		||||
  describe('getPackageManagerInfo', () => {
 | 
			
		||||
    it.each<[string, PackageManagerInfo | null]>([
 | 
			
		||||
      ['npm', utils.supportedPackageManagers.npm],
 | 
			
		||||
 
 | 
			
		||||
@@ -95,6 +95,8 @@ describe('setup-node', () => {
 | 
			
		||||
        res = <INodeVersion[]>nodeTestDistRc;
 | 
			
		||||
      } else if (url.includes('/nightly')) {
 | 
			
		||||
        res = <INodeVersion[]>nodeTestDistNightly;
 | 
			
		||||
      } else if (url.includes('/v8-canary')) {
 | 
			
		||||
        res = <INodeVersion[]>nodeV8CanaryTestDist;
 | 
			
		||||
      } else {
 | 
			
		||||
        res = <INodeVersion[]>nodeTestDist;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user