@@ -51,6 +51,8 @@ describe('createLogicMiddleware-integration', () => {
51
51
52
52
store . dispatch ( { type : 'DEC' } ) ;
53
53
store . dispatch ( { type : 'DEC' } ) ;
54
+ // we could just call done() here since everything is sync
55
+ // but whenComplete is always the safe thing to do
54
56
logicMiddleware . whenComplete ( done ) ;
55
57
} ) ;
56
58
@@ -69,6 +71,7 @@ describe('createLogicMiddleware-integration', () => {
69
71
shouldProcess : true ,
70
72
op : 'next' } ,
71
73
{ nextAction : { type : 'DEC' } , op : 'bottom' } ,
74
+ { action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
72
75
{ action : { type : 'DEC' } , op : 'top' } ,
73
76
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'begin' } ,
74
77
{ action : { type : 'DEC' } ,
@@ -81,7 +84,6 @@ describe('createLogicMiddleware-integration', () => {
81
84
op : 'dispatch' } ,
82
85
{ action : { type : 'NOOP' } , op : 'top' } ,
83
86
{ nextAction : { type : 'NOOP' } , op : 'bottom' } ,
84
- { action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
85
87
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' }
86
88
] ) ;
87
89
} ) ;
@@ -175,6 +177,8 @@ describe('createLogicMiddleware-integration', () => {
175
177
shouldProcess : true ,
176
178
op : 'next' } ,
177
179
{ nextAction : { type : 'DEC' } , op : 'bottom' } ,
180
+ { action : { type : 'DEC' } , name : 'L(*)-1' , op : 'end' } ,
181
+ { action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
178
182
{ action : { type : 'DEC' } , op : 'top' } ,
179
183
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'begin' } ,
180
184
{ action : { type : 'DEC' } ,
@@ -193,6 +197,7 @@ describe('createLogicMiddleware-integration', () => {
193
197
shouldProcess : true ,
194
198
op : 'next' } ,
195
199
{ nextAction : { type : 'NOOP' } , op : 'bottom' } ,
200
+ { action : { type : 'NOOP' } , name : 'L(*)-1' , op : 'end' } ,
196
201
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
197
202
{ action : { type : 'DEC' } , op : 'top' } ,
198
203
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'begin' } ,
@@ -212,6 +217,7 @@ describe('createLogicMiddleware-integration', () => {
212
217
shouldProcess : true ,
213
218
op : 'next' } ,
214
219
{ nextAction : { type : 'NOOP' } , op : 'bottom' } ,
220
+ { action : { type : 'NOOP' } , name : 'L(*)-1' , op : 'end' } ,
215
221
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
216
222
{ action : { type : 'DEC' } , op : 'top' } ,
217
223
{ action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'begin' } ,
@@ -231,12 +237,8 @@ describe('createLogicMiddleware-integration', () => {
231
237
shouldProcess : true ,
232
238
op : 'next' } ,
233
239
{ nextAction : { type : 'NOOP' } , op : 'bottom' } ,
234
- { action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
235
- { action : { type : 'DEC' } , name : 'L(*)-1' , op : 'end' } ,
236
- { action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' } ,
237
240
{ action : { type : 'NOOP' } , name : 'L(*)-1' , op : 'end' } ,
238
- { action : { type : 'NOOP' } , name : 'L(*)-1' , op : 'end' } ,
239
- { action : { type : 'NOOP' } , name : 'L(*)-1' , op : 'end' }
241
+ { action : { type : 'DEC' } , name : 'L(DEC)-0' , op : 'end' }
240
242
] ) ;
241
243
} ) ;
242
244
0 commit comments