@@ -270,9 +270,11 @@ describe("MultiCompiler", () => {
270270 beforeEach ( ( ) => {
271271 setupTwoCompilerEnvironment ( env ) ;
272272 env . callback = sinon . spy ( ) ;
273- env . options = {
273+ env . options = [ {
274274 testWatchOptions : true
275- } ;
275+ } , {
276+ testWatchOptions2 : true
277+ } ] ;
276278 env . result = env . myMultiCompiler . watch ( env . options , env . callback ) ;
277279 } ) ;
278280
@@ -283,9 +285,9 @@ describe("MultiCompiler", () => {
283285
284286 it ( "calls watch on each compiler with original options" , ( ) => {
285287 env . compiler1WatchCallbacks . length . should . be . exactly ( 1 ) ;
286- env . compiler1WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options ) ;
288+ env . compiler1WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options [ 0 ] ) ;
287289 env . compiler2WatchCallbacks . length . should . be . exactly ( 1 ) ;
288- env . compiler2WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options ) ;
290+ env . compiler2WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options [ 1 ] ) ;
289291 } ) ;
290292
291293 it ( "calls the callback when all compilers watch" , ( ) => {
@@ -365,21 +367,23 @@ describe("MultiCompiler", () => {
365367 name : "compiler2"
366368 } ) ;
367369 env . callback = sinon . spy ( ) ;
368- env . options = {
370+ env . options = [ {
369371 testWatchOptions : true
370- } ;
372+ } , {
373+ testWatchOptions2 : true
374+ } ] ;
371375 env . result = env . myMultiCompiler . watch ( env . options , env . callback ) ;
372376 } ) ;
373377
374378 it ( "calls run on each compiler in dependency order" , ( ) => {
375379 env . compiler1WatchCallbacks . length . should . be . exactly ( 0 ) ;
376380 env . compiler2WatchCallbacks . length . should . be . exactly ( 1 ) ;
377- env . compiler2WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options ) ;
381+ env . compiler2WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options [ 1 ] ) ;
378382 env . compiler2WatchCallbacks [ 0 ] . callback ( null , {
379383 hash : "bar"
380384 } ) ;
381385 env . compiler1WatchCallbacks . length . should . be . exactly ( 1 ) ;
382- env . compiler1WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options ) ;
386+ env . compiler1WatchCallbacks [ 0 ] . options . should . be . exactly ( env . options [ 0 ] ) ;
383387 } ) ;
384388
385389 it ( "calls the callback when all compilers run in dependency order" , ( ) => {
0 commit comments