File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,15 +11,9 @@ async function sleep(ms: number): Promise<void> {
1111 return new Promise ( ( resolve ) => setTimeout ( resolve , ms ) ) ;
1212}
1313
14- async function waitForWatcherReady ( ) : Promise < void > {
15- // Workaround for https://github.com/paulmillr/chokidar/issues/1443
16- if ( platform === 'darwin' ) {
17- await sleep ( 100 ) ;
18- }
19- }
2014async function waitForWatcherEmitAndReportDiagnostics ( ) : Promise < void > {
2115 // In watch mode, emits and diagnostic reports are batched with a 250ms delay. Therefore, a wait longer than 250ms is required.
22- await sleep ( 500 ) ;
16+ await sleep ( 2000 ) ;
2317}
2418
2519describe ( 'runCMKInWatchMode' , ( ) => {
@@ -35,7 +29,11 @@ describe('runCMKInWatchMode', () => {
3529
3630 const loggerSpy = createLoggerSpy ( ) ;
3731 const watcher = await runCMKInWatchMode ( fakeParsedArgs ( { project : iff . rootDir } ) , loggerSpy ) ;
38- await waitForWatcherReady ( ) ;
32+
33+ // Workaround for https://github.com/paulmillr/chokidar/issues/1443
34+ if ( platform === 'darwin' ) {
35+ await sleep ( 100 ) ;
36+ }
3937
4038 // Error when changing a file
4139 console . log ( 'update a.module.css' ) ;
You can’t perform that action at this time.
0 commit comments