File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 1
1
import * as core from '@actions/core' ;
2
2
import * as cache from '@actions/cache' ;
3
3
import * as glob from '@actions/glob' ;
4
+ import fs from 'fs' ;
4
5
import path from 'path' ;
5
6
6
7
import * as utils from '../src/cache-utils' ;
@@ -28,6 +29,7 @@ describe('run', () => {
28
29
let saveCacheSpy : jest . SpyInstance ;
29
30
let getCommandOutputSpy : jest . SpyInstance ;
30
31
let hashFilesSpy : jest . SpyInstance ;
32
+ let existsSpy : jest . SpyInstance ;
31
33
32
34
beforeEach ( ( ) => {
33
35
getInputSpy = jest . spyOn ( core , 'getInput' ) ;
@@ -63,6 +65,9 @@ describe('run', () => {
63
65
}
64
66
} ) ;
65
67
68
+ existsSpy = jest . spyOn ( fs , 'existsSync' ) ;
69
+ existsSpy . mockImplementation ( ( ) => true ) ;
70
+
66
71
// utils
67
72
getCommandOutputSpy = jest . spyOn ( utils , 'getCommandOutput' ) ;
68
73
} ) ;
You can’t perform that action at this time.
0 commit comments