@@ -14,20 +14,20 @@ describe('runClean', () => {
1414 it ( 'should remove a single path' , async ( ) => {
1515 await runClean ( [ 'dist' ] ) ;
1616
17- expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'dist' , { recursive : true , force : true } ) ;
17+ expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'dist' , { recursive : true , force : true , maxRetries : 3 , retryDelay : 100 } ) ;
1818 } ) ;
1919
2020 it ( 'should remove multiple paths' , async ( ) => {
2121 await runClean ( [ 'dist' , 'build' , 'temp' ] ) ;
2222
23- expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'dist' , { recursive : true , force : true } ) ;
24- expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'build' , { recursive : true , force : true } ) ;
25- expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'temp' , { recursive : true , force : true } ) ;
23+ expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'dist' , { recursive : true , force : true , maxRetries : 3 , retryDelay : 100 } ) ;
24+ expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'build' , { recursive : true , force : true , maxRetries : 3 , retryDelay : 100 } ) ;
25+ expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'temp' , { recursive : true , force : true , maxRetries : 3 , retryDelay : 100 } ) ;
2626 } ) ;
2727
2828 it ( 'should default to "dist" if no paths provided' , async ( ) => {
2929 await runClean ( [ ] ) ;
3030
31- expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'dist' , { recursive : true , force : true } ) ;
31+ expect ( mockedFs . rm ) . toHaveBeenCalledWith ( 'dist' , { recursive : true , force : true , maxRetries : 3 , retryDelay : 100 } ) ;
3232 } ) ;
3333} ) ;
0 commit comments