@@ -680,12 +680,20 @@ describe('Sorted State Adapter', () => {
680
680
test ( 'updateMany' , ( ) => {
681
681
const firstChange = { title : 'First Change' }
682
682
const secondChange = { title : 'Second Change' }
683
- const withMany = adapter . setAll ( state , [ TheGreatGatsby , AClockworkOrange ] )
683
+ const thirdChange = { title : 'Third Change' }
684
+ const fourthChange = { author : 'Fourth Change' }
685
+ const withMany = adapter . setAll ( state , [
686
+ TheGreatGatsby ,
687
+ AClockworkOrange ,
688
+ TheHobbit ,
689
+ ] )
684
690
685
691
const result = createNextState ( withMany , ( draft ) => {
686
692
adapter . updateMany ( draft , [
687
- { id : TheGreatGatsby . id , changes : firstChange } ,
688
- { id : AClockworkOrange . id , changes : secondChange } ,
693
+ { id : TheHobbit . id , changes : firstChange } ,
694
+ { id : TheGreatGatsby . id , changes : secondChange } ,
695
+ { id : AClockworkOrange . id , changes : thirdChange } ,
696
+ { id : TheHobbit . id , changes : fourthChange } ,
689
697
] )
690
698
} )
691
699
@@ -694,14 +702,20 @@ describe('Sorted State Adapter', () => {
694
702
"entities": Object {
695
703
"aco": Object {
696
704
"id": "aco",
697
- "title": "Second Change",
705
+ "title": "Third Change",
698
706
},
699
707
"tgg": Object {
700
708
"id": "tgg",
709
+ "title": "Second Change",
710
+ },
711
+ "th": Object {
712
+ "author": "Fourth Change",
713
+ "id": "th",
701
714
"title": "First Change",
702
715
},
703
716
},
704
717
"ids": Array [
718
+ "th",
705
719
"tgg",
706
720
"aco",
707
721
],
0 commit comments