11'use strict' ;
22
33const { run } = require ( '../utils/test-utils' ) ;
4+ const { existsSync } = require ( 'fs' ) ;
5+ const { resolve } = require ( 'path' ) ;
46
57describe ( 'cache related flags from core' , ( ) => {
68 it ( 'should be successful with --cache ' , ( ) => {
@@ -25,17 +27,19 @@ describe('cache related flags from core', () => {
2527 } ) ;
2628
2729 it ( 'should set cache.cacheDirectory with --cache-cache-directory' , ( ) => {
28- const { stderr, stdout } = run ( __dirname , [ '--cache-type' , 'filesystem' , '--cache-cache-directory' , '/test-cache-path' ] ) ;
30+ const { stderr, stdout } = run ( __dirname , [ '--cache-type' , 'filesystem' , '--cache-cache-directory' , '. /test-cache-path' ] ) ;
2931
3032 expect ( stderr ) . toBeFalsy ( ) ;
3133 expect ( stdout ) . toContain ( 'test-cache-path' ) ;
34+ expect ( existsSync ( resolve ( __dirname , './test-cache-path' ) ) ) . toBeTruthy ( ) ;
3235 } ) ;
3336
3437 it ( 'should set cache.cacheLocation with --cache-cache-locations' , ( ) => {
35- const { stderr, stdout } = run ( __dirname , [ '--cache-type' , 'filesystem' , '--cache-cache-location' , '/test-locate-cache' ] ) ;
38+ const { stderr, stdout } = run ( __dirname , [ '--cache-type' , 'filesystem' , '--cache-cache-location' , '. /test-locate-cache' ] ) ;
3639
3740 expect ( stderr ) . toBeFalsy ( ) ;
3841 expect ( stdout ) . toContain ( 'test-locate-cache' ) ;
42+ expect ( existsSync ( resolve ( __dirname , './test-locate-cache' ) ) ) . toBeTruthy ( ) ;
3943 } ) ;
4044
4145 it ( 'should set cache.hashAlgorithm with --cache-hash-algorithm' , ( ) => {
0 commit comments