@@ -23,8 +23,10 @@ describe('cache-utils', () => {
2323 let isFeatureAvailable : jest . SpyInstance ;
2424 let info : jest . SpyInstance ;
2525 let warningSpy : jest . SpyInstance ;
26+ let fsRealPathSyncSpy : jest . SpyInstance ;
2627
2728 beforeEach ( ( ) => {
29+ console . log ( '::stop-commands::stoptoken' ) ;
2830 process . env [ 'GITHUB_WORKSPACE' ] = path . join ( __dirname , 'data' ) ;
2931 debugSpy = jest . spyOn ( core , 'debug' ) ;
3032 debugSpy . mockImplementation ( msg => { } ) ;
@@ -35,8 +37,24 @@ describe('cache-utils', () => {
3537 isFeatureAvailable = jest . spyOn ( cache , 'isFeatureAvailable' ) ;
3638
3739 getCommandOutputSpy = jest . spyOn ( utils , 'getCommandOutput' ) ;
40+
41+ fsRealPathSyncSpy = jest . spyOn ( fs , 'realpathSync' ) ;
42+ fsRealPathSyncSpy . mockImplementation ( dirName => {
43+ return dirName ;
44+ } ) ;
45+ } ) ;
46+
47+ afterEach ( ( ) => {
48+ jest . resetAllMocks ( ) ;
49+ jest . clearAllMocks ( ) ;
50+ //jest.restoreAllMocks();
3851 } ) ;
3952
53+ afterAll ( async ( ) => {
54+ console . log ( '::stoptoken::' ) ;
55+ jest . restoreAllMocks ( ) ;
56+ } , 100000 ) ;
57+
4058 describe ( 'getPackageManagerInfo' , ( ) => {
4159 it . each < [ string , PackageManagerInfo | null ] > ( [
4260 [ 'npm' , utils . supportedPackageManagers . npm ] ,
0 commit comments