@@ -23,8 +23,10 @@ describe('cache-utils', () => {
23
23
let isFeatureAvailable : jest . SpyInstance ;
24
24
let info : jest . SpyInstance ;
25
25
let warningSpy : jest . SpyInstance ;
26
+ let fsRealPathSyncSpy : jest . SpyInstance ;
26
27
27
28
beforeEach ( ( ) => {
29
+ console . log ( '::stop-commands::stoptoken' ) ;
28
30
process . env [ 'GITHUB_WORKSPACE' ] = path . join ( __dirname , 'data' ) ;
29
31
debugSpy = jest . spyOn ( core , 'debug' ) ;
30
32
debugSpy . mockImplementation ( msg => { } ) ;
@@ -35,8 +37,24 @@ describe('cache-utils', () => {
35
37
isFeatureAvailable = jest . spyOn ( cache , 'isFeatureAvailable' ) ;
36
38
37
39
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();
38
51
} ) ;
39
52
53
+ afterAll ( async ( ) => {
54
+ console . log ( '::stoptoken::' ) ;
55
+ jest . restoreAllMocks ( ) ;
56
+ } , 100000 ) ;
57
+
40
58
describe ( 'getPackageManagerInfo' , ( ) => {
41
59
it . each < [ string , PackageManagerInfo | null ] > ( [
42
60
[ 'npm' , utils . supportedPackageManagers . npm ] ,
0 commit comments