@@ -31,7 +31,9 @@ test.group('Watcher', () => {
31
31
done ( )
32
32
} )
33
33
34
- await fs . create ( 'bar.ts' , '' )
34
+ output ! . watcher . on ( 'watcher:ready' , async ( ) => {
35
+ await fs . create ( 'bar.ts' , '' )
36
+ } )
35
37
} )
36
38
. waitForDone ( )
37
39
. skip ( ! ! process . env . CI , 'Skipping in CI. Cannot get chokidar to work' )
@@ -55,7 +57,9 @@ test.group('Watcher', () => {
55
57
done ( )
56
58
} )
57
59
58
- await fs . create ( 'foo.ts' , 'hello world' )
60
+ output ! . watcher . on ( 'watcher:ready' , async ( ) => {
61
+ await fs . create ( 'foo.ts' , 'hello world' )
62
+ } )
59
63
} )
60
64
. waitForDone ( )
61
65
. skip ( ! ! process . env . CI , 'Skipping in CI. Cannot get chokidar to work' )
@@ -79,7 +83,9 @@ test.group('Watcher', () => {
79
83
done ( )
80
84
} )
81
85
82
- await fs . remove ( 'foo.ts' )
86
+ output ! . watcher . on ( 'watcher:ready' , async ( ) => {
87
+ await fs . remove ( 'foo.ts' )
88
+ } )
83
89
} )
84
90
. waitForDone ( )
85
91
. skip ( ! ! process . env . CI , 'Skipping in CI. Cannot get chokidar to work' )
@@ -105,7 +111,9 @@ test.group('Watcher', () => {
105
111
assert . fail ( 'Never expected to reach here' )
106
112
} )
107
113
108
- await fs . create ( 'baz.ts' , '' )
114
+ output ! . watcher . on ( 'watcher:ready' , async ( ) => {
115
+ await fs . create ( 'baz.ts' , '' )
116
+ } )
109
117
await new Promise ( ( resolve ) => setTimeout ( resolve , 1000 ) )
110
118
} ) . skip ( ! ! process . env . CI , 'Skipping in CI. Cannot get chokidar to work' )
111
119
@@ -132,7 +140,9 @@ test.group('Watcher', () => {
132
140
done ( )
133
141
} )
134
142
135
- await fs . create ( 'foo.md' , '' )
143
+ output ! . watcher . on ( 'watcher:ready' , async ( ) => {
144
+ await fs . create ( 'foo.md' , '' )
145
+ } )
136
146
} )
137
147
. waitForDone ( )
138
148
. skip ( ! ! process . env . CI , 'Skipping in CI. Cannot get chokidar to work' )
0 commit comments