@@ -58,11 +58,12 @@ export default defineConfig({
58
58
describe ( 'build --watch should handle add / change / unlink' , async ( ) => {
59
59
test ( 'basic' , async ( ) => {
60
60
const tempSrcPath = path . join ( __dirname , 'test-temp-src' ) ;
61
+ const tempConfigFile = path . join ( __dirname , 'test-temp-rslib.config.mjs' ) ;
61
62
await fse . remove ( tempSrcPath ) ;
62
63
await fse . remove ( path . join ( __dirname , 'dist' ) ) ;
63
- await fse . copy ( path . join ( __dirname , 'src' ) , path . resolve ( tempSrcPath ) ) ;
64
- const tempConfigFile = path . join ( __dirname , 'test-temp-rslib.config.mjs' ) ;
65
64
await fse . remove ( tempConfigFile ) ;
65
+
66
+ await fse . copy ( path . join ( __dirname , 'src' ) , path . resolve ( tempSrcPath ) ) ;
66
67
fse . outputFileSync (
67
68
tempConfigFile ,
68
69
`import { defineConfig } from '@rslib/core';
@@ -102,11 +103,11 @@ export default defineConfig({
102
103
shell : true ,
103
104
} ,
104
105
) ;
105
-
106
106
await awaitFileExists ( distIndexFile ) ;
107
107
108
108
fse . outputFileSync ( srcFooFile , `export const foo = 'foo';` ) ;
109
109
fse . outputFileSync ( srcFoo2File , `export const foo2 = 'foo2';` ) ;
110
+ await awaitFileExists ( distFooFile ) ;
110
111
await awaitFileExists ( distFoo2File ) ;
111
112
const content1 = await fse . readFile ( distFooFile , 'utf-8' ) ;
112
113
expect ( content1 ! ) . toMatchInlineSnapshot ( `
0 commit comments