mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 05:19:11 +08:00 
			
		
		
		
	replace throw with warn
This commit is contained in:
		
				
					committed by
					
						
						Sergey Dolin
					
				
			
			
				
	
			
			
			
						parent
						
							676975d9aa
						
					
				
				
					commit
					b28830cbe2
				
			@@ -46,7 +46,8 @@ describe('cache-utils', () => {
 | 
			
		||||
    isFeatureAvailable.mockImplementation(() => false);
 | 
			
		||||
    process.env['GITHUB_SERVER_URL'] = 'https://www.test.com';
 | 
			
		||||
 | 
			
		||||
    expect(() => isCacheFeatureAvailable()).toThrowError(
 | 
			
		||||
    expect(isCacheFeatureAvailable()).toBeFalsy();
 | 
			
		||||
    expect(warningSpy).toHaveBeenCalledWith(
 | 
			
		||||
      'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
 | 
			
		||||
    );
 | 
			
		||||
  });
 | 
			
		||||
 
 | 
			
		||||
@@ -728,8 +728,9 @@ describe('setup-node', () => {
 | 
			
		||||
 | 
			
		||||
      await main.run();
 | 
			
		||||
 | 
			
		||||
      expect(cnSpy).toHaveBeenCalledWith(
 | 
			
		||||
        `::error::Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.${osm.EOL}`
 | 
			
		||||
      expect(warningSpy).toHaveBeenCalledWith(
 | 
			
		||||
        //  `::error::Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.${osm.EOL}`
 | 
			
		||||
        'Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.'
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user