@@ -337,15 +337,15 @@ describe('ngRx Store', () => {
337337 store . addReducer ( key , counterReducer ) ;
338338 expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledWith ( {
339339 type : UPDATE ,
340- feature : key ,
340+ features : [ key ] ,
341341 } ) ;
342342 } ) ;
343343
344344 it ( 'should dispatch an update reducers action when a reducer is removed' , ( ) => {
345345 store . removeReducer ( key ) ;
346346 expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledWith ( {
347347 type : UPDATE ,
348- feature : key ,
348+ features : [ key ] ,
349349 } ) ;
350350 } ) ;
351351 } ) ;
@@ -373,11 +373,11 @@ describe('ngRx Store', () => {
373373
374374 expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledWith ( {
375375 type : UPDATE ,
376- feature : 'feature1' ,
376+ features : [ 'feature1' ] ,
377377 } ) ;
378378 } ) ;
379379
380- it ( 'should dispatch an update reducers action for each feature that is added' , ( ) => {
380+ it ( 'should dispatch an update reducers action when multiple features are added' , ( ) => {
381381 reducerManager . addFeatures ( [
382382 createFeature ( {
383383 key : 'feature1' ,
@@ -387,18 +387,10 @@ describe('ngRx Store', () => {
387387 } ) ,
388388 ] ) ;
389389
390- expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledTimes ( 2 ) ;
391-
392- // get the first argument for the first call
393- expect ( reducerManagerDispatcherSpy . calls . argsFor ( 0 ) [ 0 ] ) . toEqual ( {
394- type : UPDATE ,
395- feature : 'feature1' ,
396- } ) ;
397-
398- // get the first argument for the second call
399- expect ( reducerManagerDispatcherSpy . calls . argsFor ( 1 ) [ 0 ] ) . toEqual ( {
390+ expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledTimes ( 1 ) ;
391+ expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledWith ( {
400392 type : UPDATE ,
401- feature : ' feature2',
393+ features : [ 'feature1' , ' feature2'] ,
402394 } ) ;
403395 } ) ;
404396
@@ -411,11 +403,11 @@ describe('ngRx Store', () => {
411403
412404 expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledWith ( {
413405 type : UPDATE ,
414- feature : 'feature1' ,
406+ features : [ 'feature1' ] ,
415407 } ) ;
416408 } ) ;
417409
418- it ( 'should dispatch an update reducers action for each feature that is removed' , ( ) => {
410+ it ( 'should dispatch an update reducers action when multiple features are removed' , ( ) => {
419411 reducerManager . removeFeatures ( [
420412 createFeature ( {
421413 key : 'feature1' ,
@@ -425,16 +417,10 @@ describe('ngRx Store', () => {
425417 } ) ,
426418 ] ) ;
427419
428- // get the first argument for the first call
429- expect ( reducerManagerDispatcherSpy . calls . argsFor ( 0 ) [ 0 ] ) . toEqual ( {
430- type : UPDATE ,
431- feature : 'feature1' ,
432- } ) ;
433-
434- // get the first argument for the second call
435- expect ( reducerManagerDispatcherSpy . calls . argsFor ( 1 ) [ 0 ] ) . toEqual ( {
420+ expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledTimes ( 1 ) ;
421+ expect ( reducerManagerDispatcherSpy ) . toHaveBeenCalledWith ( {
436422 type : UPDATE ,
437- feature : ' feature2',
423+ features : [ 'feature1' , ' feature2'] ,
438424 } ) ;
439425 } ) ;
440426
0 commit comments