@@ -54,6 +54,10 @@ describe('hmr', function() {
5454
5555 const buildEnd = nextEvent ( b , 'buildEnd' ) ;
5656
57+ if ( process . platform === 'win32' ) {
58+ await sleep ( 100 ) ;
59+ }
60+
5761 fs . writeFileSync (
5862 __dirname + '/input/local.js' ,
5963 'exports.a = 5;\nexports.b = 5;'
@@ -99,6 +103,10 @@ describe('hmr', function() {
99103
100104 const buildEnd = nextEvent ( b , 'buildEnd' ) ;
101105
106+ if ( process . platform === 'win32' ) {
107+ await sleep ( 100 ) ;
108+ }
109+
102110 fs . writeFileSync (
103111 __dirname + '/input/local.js' ,
104112 'exports.a = 5; exports.b = 5;'
@@ -123,6 +131,10 @@ describe('hmr', function() {
123131
124132 const buildEnd = nextEvent ( b , 'buildEnd' ) ;
125133
134+ if ( process . platform === 'win32' ) {
135+ await sleep ( 100 ) ;
136+ }
137+
126138 fs . writeFileSync (
127139 __dirname + '/input/local.js' ,
128140 'require("fs"); exports.a = 5; exports.b = 5;'
@@ -145,6 +157,10 @@ describe('hmr', function() {
145157
146158 const buildEnd = nextEvent ( b , 'buildEnd' ) ;
147159
160+ if ( process . platform === 'win32' ) {
161+ await sleep ( 100 ) ;
162+ }
163+
148164 fs . writeFileSync (
149165 __dirname + '/input/local.js' ,
150166 'require("fs"; exports.a = 5; exports.b = 5;'
@@ -173,6 +189,10 @@ describe('hmr', function() {
173189 b = bundler ( __dirname + '/input/index.js' , { watch : true , hmr : true } ) ;
174190 await b . bundle ( ) ;
175191
192+ if ( process . platform === 'win32' ) {
193+ await sleep ( 100 ) ;
194+ }
195+
176196 fs . writeFileSync (
177197 __dirname + '/input/local.js' ,
178198 'require("fs"; exports.a = 5; exports.b = 5;'
@@ -195,6 +215,10 @@ describe('hmr', function() {
195215
196216 const firstBuildEnd = nextEvent ( b , 'buildEnd' ) ;
197217
218+ if ( process . platform === 'win32' ) {
219+ await sleep ( 100 ) ;
220+ }
221+
198222 fs . writeFileSync (
199223 __dirname + '/input/local.js' ,
200224 'require("fs"; exports.a = 5; exports.b = 5;'
@@ -233,6 +257,10 @@ describe('hmr', function() {
233257
234258 assert . deepEqual ( outputs , [ 3 ] ) ;
235259
260+ if ( process . platform === 'win32' ) {
261+ await sleep ( 100 ) ;
262+ }
263+
236264 fs . writeFileSync (
237265 __dirname + '/input/local.js' ,
238266 'exports.a = 5; exports.b = 5;'
@@ -261,6 +289,10 @@ describe('hmr', function() {
261289
262290 assert . deepEqual ( outputs , [ 3 ] ) ;
263291
292+ if ( process . platform === 'win32' ) {
293+ await sleep ( 100 ) ;
294+ }
295+
264296 fs . writeFileSync (
265297 __dirname + '/input/local.js' ,
266298 'exports.a = 5; exports.b = 5;'
@@ -292,6 +324,10 @@ describe('hmr', function() {
292324 await sleep ( 50 ) ;
293325 assert . deepEqual ( outputs , [ 3 ] ) ;
294326
327+ if ( process . platform === 'win32' ) {
328+ await sleep ( 100 ) ;
329+ }
330+
295331 fs . writeFileSync (
296332 __dirname + '/input/local.js' ,
297333 'exports.a = 5; exports.b = 5;'
@@ -324,6 +360,10 @@ describe('hmr', function() {
324360
325361 let spy = sinon . spy ( ctx . document . body , 'appendChild' ) ;
326362
363+ if ( process . platform === 'win32' ) {
364+ await sleep ( 100 ) ;
365+ }
366+
327367 fs . writeFileSync (
328368 __dirname + '/input/local.js' ,
329369 'require("fs"; exports.a = 5; exports.b = 5;'
@@ -362,6 +402,10 @@ describe('hmr', function() {
362402 let appendSpy = sinon . spy ( ctx . document . body , 'appendChild' ) ;
363403 let removeSpy = sinon . spy ( ctx . document . getElementById ( 'tmp' ) , 'remove' ) ;
364404
405+ if ( process . platform === 'win32' ) {
406+ await sleep ( 100 ) ;
407+ }
408+
365409 fs . writeFileSync (
366410 __dirname + '/input/local.js' ,
367411 'require("fs"; exports.a = 5; exports.b = 5;'
@@ -401,6 +445,10 @@ describe('hmr', function() {
401445
402446 const buildEnd = nextEvent ( b , 'buildEnd' ) ;
403447
448+ if ( process . platform === 'win32' ) {
449+ await sleep ( 100 ) ;
450+ }
451+
404452 fs . writeFileSync (
405453 __dirname + '/input/local.js' ,
406454 'exports.a = 5;\nexports.b = 5;'
@@ -434,6 +482,10 @@ describe('hmr', function() {
434482
435483 const buildEnd = nextEvent ( b , 'buildEnd' ) ;
436484
485+ if ( process . platform === 'win32' ) {
486+ await sleep ( 100 ) ;
487+ }
488+
437489 fs . writeFileSync (
438490 __dirname + '/input/local.js' ,
439491 'exports.a = 5;\nexports.b = 5;'
0 commit comments