@@ -33,7 +33,7 @@ describe('optimization task', () => {
3333
3434 describe ( 'purgeGeneratedFiles' , ( ) => {
3535 it ( 'should remove files in buildDir with suffix from the cache' , ( ) => {
36- const buildDir = '/ some/ fake/ dir/ myApp/ www/ build';
36+ const buildDir = join ( process . cwd ( ) , ' some' , ' fake' , ' dir' , ' myApp' , ' www' , ' build') ;
3737 const context = {
3838 fileCache : new FileCache ( ) ,
3939 buildDir : buildDir
@@ -43,9 +43,9 @@ describe('optimization task', () => {
4343 const filePathTwo = join ( buildDir , `1.${ suffix } ` ) ;
4444 const filePathThree = join ( buildDir , `main.js` ) ;
4545 const filePathFour = join ( buildDir , `main.css` ) ;
46- const filePathFive = join ( 'some' , 'fake' , 'dir' , 'myApp' , 'src' , `app.ts` ) ;
47- const filePathSix = join ( 'some' , 'fake' , 'dir' , 'myApp' , 'src' , `app.js` ) ;
48- const filePathSeven = join ( 'some' , 'fake' , 'dir' , 'myApp' , 'src' , 'pages' , `1.${ suffix } ` ) ;
46+ const filePathFive = join ( process . cwd ( ) , 'some' , 'fake' , 'dir' , 'myApp' , 'src' , `app.ts` ) ;
47+ const filePathSix = join ( process . cwd ( ) , 'some' , 'fake' , 'dir' , 'myApp' , 'src' , `app.js` ) ;
48+ const filePathSeven = join ( process . cwd ( ) , 'some' , 'fake' , 'dir' , 'myApp' , 'src' , 'pages' , `1.${ suffix } ` ) ;
4949 context . fileCache . set ( filePathOne , { path : filePathOne , content : filePathOne } ) ;
5050 context . fileCache . set ( filePathTwo , { path : filePathTwo , content : filePathTwo } ) ;
5151 context . fileCache . set ( filePathThree , { path : filePathThree , content : filePathThree } ) ;
0 commit comments