@@ -16,13 +16,15 @@ beforeEach(() => {
1616} ) ;
1717
1818describe ( 'getDirInput' , ( ) => {
19- it ( 'can return input value when $SELF_CACHED_DIR is not set' , ( ) => {
19+ it ( 'can return input value when only $SELF_CACHED_DIR is set' , ( ) => {
2020 vi . stubEnv ( 'SELF_CACHED_DIR' , 'foo' ) ;
21+ vi . stubEnv ( 'RUNNER_TOOL_CACHE' , undefined ) ;
2122 expect ( getDirInput ( 'baz' ) ) . toBe ( 'baz' ) ;
2223 expect ( getDirInput ( undefined ) ) . toBe ( 'foo' ) ;
2324 } ) ;
2425
25- it ( 'can return input value when $RUNNER_TOOL_CACHE is not set' , ( ) => {
26+ it ( 'can return input value when only $RUNNER_TOOL_CACHE is set' , ( ) => {
27+ vi . stubEnv ( 'SELF_CACHED_DIR' , undefined ) ;
2628 vi . stubEnv ( 'RUNNER_TOOL_CACHE' , 'foo' ) ;
2729 expect ( getDirInput ( 'baz' ) ) . toBe ( 'baz' ) ;
2830 expect ( getDirInput ( undefined ) ) . toBe ( 'foo' ) ;
@@ -36,6 +38,8 @@ describe('getDirInput', () => {
3638 } ) ;
3739
3840 it ( "can't return input value when $SELF_CACHED_DIR and $RUNNER_TOOL_CACHE are not set" , ( ) => {
41+ vi . stubEnv ( 'SELF_CACHED_DIR' , undefined ) ;
42+ vi . stubEnv ( 'RUNNER_TOOL_CACHE' , undefined ) ;
3943 expect ( getDirInput ( 'baz' ) ) . toBe ( 'baz' ) ;
4044 expect ( getDirInput ( undefined ) ) . toBe ( undefined ) ;
4145 } ) ;
@@ -58,6 +62,7 @@ describe('getCompressInput', () => {
5862 } ) ;
5963
6064 it ( 'can return input value when $SELF_CACHED_COMPRESS is not set' , ( ) => {
65+ vi . stubEnv ( 'SELF_CACHED_COMPRESS' , undefined ) ;
6166 expect ( getCompressInput ( undefined ) ) . toBe ( false ) ;
6267 expect ( getCompressInput ( '' ) ) . toBe ( false ) ;
6368 expect ( getCompressInput ( 'true' ) ) . toBe ( true ) ;
0 commit comments