File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -426,7 +426,6 @@ describe("Compiler", () => {
426426 compiler . outputFileSystem = new MemoryFs ( ) ;
427427 const watching = compiler . watch ( { } , ( err , stats ) => {
428428 if ( err ) return done ( err ) ;
429- done ( ) ;
430429 } ) ;
431430 watching . close ( ( ) => {
432431 compiler . run ( ( err , stats ) => {
@@ -435,4 +434,25 @@ describe("Compiler", () => {
435434 } ) ;
436435 } ) ;
437436 } ) ;
437+ it ( "should watch again correctly after first closed watch" , function ( done ) {
438+ const compiler = webpack ( {
439+ context : __dirname ,
440+ mode : "production" ,
441+ entry : "./c" ,
442+ output : {
443+ path : "/" ,
444+ filename : "bundle.js"
445+ }
446+ } ) ;
447+ compiler . outputFileSystem = new MemoryFs ( ) ;
448+ const watching = compiler . watch ( { } , ( err , stats ) => {
449+ if ( err ) return done ( err ) ;
450+ } ) ;
451+ watching . close ( ( ) => {
452+ compiler . watch ( { } , ( err , stats ) => {
453+ if ( err ) return done ( err ) ;
454+ done ( ) ;
455+ } ) ;
456+ } ) ;
457+ } ) ;
438458} ) ;
You can’t perform that action at this time.
0 commit comments