@@ -246,7 +246,7 @@ describe("Compiler", () => {
246246 } ) ;
247247 } ) ;
248248 } ) ;
249- it ( "should not emit on errors" , function ( done ) {
249+ it ( "should not emit on errors" , function ( done ) {
250250 const compiler = webpack ( {
251251 context : __dirname ,
252252 mode : "production" ,
@@ -282,8 +282,8 @@ describe("Compiler", () => {
282282 return done ( new Error ( "Bundle should not be created on error" ) ) ;
283283 done ( ) ;
284284 } ) ;
285- } ) ;
286- it ( "should not be run twice at a time (run)" , function ( done ) {
285+ } ) ;
286+ it ( "should not be run twice at a time (run)" , function ( done ) {
287287 const compiler = webpack ( {
288288 context : __dirname ,
289289 mode : "production" ,
@@ -301,7 +301,7 @@ describe("Compiler", () => {
301301 if ( err ) return done ( ) ;
302302 } ) ;
303303 } ) ;
304- it ( "should not be run twice at a time (watch)" , function ( done ) {
304+ it ( "should not be run twice at a time (watch)" , function ( done ) {
305305 const compiler = webpack ( {
306306 context : __dirname ,
307307 mode : "production" ,
@@ -318,8 +318,8 @@ describe("Compiler", () => {
318318 compiler . watch ( { } , ( err , stats ) => {
319319 if ( err ) return done ( ) ;
320320 } ) ;
321- } ) ;
322- it ( "should not be run twice at a time (run - watch)" , function ( done ) {
321+ } ) ;
322+ it ( "should not be run twice at a time (run - watch)" , function ( done ) {
323323 const compiler = webpack ( {
324324 context : __dirname ,
325325 mode : "production" ,
@@ -333,11 +333,11 @@ describe("Compiler", () => {
333333 compiler . run ( ( err , stats ) => {
334334 if ( err ) return done ( err ) ;
335335 } ) ;
336- compiler . watch ( { } , ( err , stats ) => {
336+ compiler . watch ( { } , ( err , stats ) => {
337337 if ( err ) return done ( ) ;
338338 } ) ;
339339 } ) ;
340- it ( "should not be run twice at a time (watch - run)" , function ( done ) {
340+ it ( "should not be run twice at a time (watch - run)" , function ( done ) {
341341 const compiler = webpack ( {
342342 context : __dirname ,
343343 mode : "production" ,
@@ -348,29 +348,32 @@ describe("Compiler", () => {
348348 }
349349 } ) ;
350350 compiler . outputFileSystem = new MemoryFs ( ) ;
351- compiler . watch ( { } , ( err , stats ) => {
351+ compiler . watch ( { } , ( err , stats ) => {
352352 if ( err ) return done ( err ) ;
353353 } ) ;
354- compiler . run ( ( err , stats ) => {
354+ compiler . run ( ( err , stats ) => {
355355 if ( err ) return done ( ) ;
356356 } ) ;
357357 } ) ;
358- it ( "should not be run twice at a time (instance cb)" , function ( done ) {
359- const compiler = webpack ( {
360- context : __dirname ,
361- mode : "production" ,
362- entry : "./c" ,
363- output : {
364- path : "/" ,
365- filename : "bundle.js"
366- }
367- } , ( ) => { } ) ;
358+ it ( "should not be run twice at a time (instance cb)" , function ( done ) {
359+ const compiler = webpack (
360+ {
361+ context : __dirname ,
362+ mode : "production" ,
363+ entry : "./c" ,
364+ output : {
365+ path : "/" ,
366+ filename : "bundle.js"
367+ }
368+ } ,
369+ ( ) => { }
370+ ) ;
368371 compiler . outputFileSystem = new MemoryFs ( ) ;
369- compiler . run ( ( err , stats ) => {
372+ compiler . run ( ( err , stats ) => {
370373 if ( err ) return done ( ) ;
371374 } ) ;
372375 } ) ;
373- it ( "should run again correctly after first compilation" , function ( done ) {
376+ it ( "should run again correctly after first compilation" , function ( done ) {
374377 const compiler = webpack ( {
375378 context : __dirname ,
376379 mode : "production" ,
@@ -381,16 +384,16 @@ describe("Compiler", () => {
381384 }
382385 } ) ;
383386 compiler . outputFileSystem = new MemoryFs ( ) ;
384- compiler . run ( ( err , stats ) => {
385- if ( err ) return done ( err ) ;
387+ compiler . run ( ( err , stats ) => {
388+ if ( err ) return done ( err ) ;
386389
387- compiler . run ( ( err , stats ) => {
388- if ( err ) return done ( err ) ;
389- done ( )
390- } ) ;
390+ compiler . run ( ( err , stats ) => {
391+ if ( err ) return done ( err ) ;
392+ done ( ) ;
393+ } ) ;
391394 } ) ;
392395 } ) ;
393- it ( "should watch again correctly after first compilation" , function ( done ) {
396+ it ( "should watch again correctly after first compilation" , function ( done ) {
394397 const compiler = webpack ( {
395398 context : __dirname ,
396399 mode : "production" ,
@@ -401,16 +404,16 @@ describe("Compiler", () => {
401404 }
402405 } ) ;
403406 compiler . outputFileSystem = new MemoryFs ( ) ;
404- compiler . run ( ( err , stats ) => {
405- if ( err ) return done ( err ) ;
407+ compiler . run ( ( err , stats ) => {
408+ if ( err ) return done ( err ) ;
406409
407- compiler . watch ( { } , ( err , stats ) => {
408- if ( err ) return done ( err ) ;
409- done ( )
410- } ) ;
410+ compiler . watch ( { } , ( err , stats ) => {
411+ if ( err ) return done ( err ) ;
412+ done ( ) ;
413+ } ) ;
411414 } ) ;
412415 } ) ;
413- it ( "should run again correctly after first closed watch" , function ( done ) {
416+ it ( "should run again correctly after first closed watch" , function ( done ) {
414417 const compiler = webpack ( {
415418 context : __dirname ,
416419 mode : "production" ,
@@ -421,15 +424,15 @@ describe("Compiler", () => {
421424 }
422425 } ) ;
423426 compiler . outputFileSystem = new MemoryFs ( ) ;
424- const watching = compiler . watch ( { } , ( err , stats ) => {
425- if ( err ) return done ( err ) ;
426- done ( )
427- } ) ;
428- watching . close ( ( ) => {
429- compiler . run ( ( err , stats ) => {
430- if ( err ) return done ( err ) ;
431- done ( )
432- } ) ;
433- } )
427+ const watching = compiler . watch ( { } , ( err , stats ) => {
428+ if ( err ) return done ( err ) ;
429+ done ( ) ;
430+ } ) ;
431+ watching . close ( ( ) => {
432+ compiler . run ( ( err , stats ) => {
433+ if ( err ) return done ( err ) ;
434+ done ( ) ;
435+ } ) ;
436+ } ) ;
434437 } ) ;
435438} ) ;
0 commit comments