File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -201,19 +201,21 @@ describe("raven-for-redux", function() {
201
201
it ( "filters actions for breadcrumbs" , function ( ) {
202
202
context . store . dispatch ( { type : "INCREMENT" } ) ;
203
203
context . store . dispatch ( { type : "UNINTERESTING_ACTION" } ) ;
204
- context . store . dispatch ( { type : "INCREMENT" } ) ;
205
204
context . store . dispatch ( { type : "UNINTERESTING_ACTION" } ) ;
205
+ Raven . captureMessage ( "report!" ) ;
206
+
207
+ expect ( context . mockTransport ) . toHaveBeenCalledTimes ( 1 ) ;
208
+ const { breadcrumbs } = context . mockTransport . mock . calls [ 0 ] [ 0 ] . data ;
209
+ expect ( breadcrumbs . values . length ) . toBe ( 1 ) ;
210
+ } ) ;
211
+ it ( "sends action with data.extra even if it was filtered" , function ( ) {
206
212
context . store . dispatch ( { type : "UNINTERESTING_ACTION" } ) ;
207
213
Raven . captureMessage ( "report!" ) ;
208
214
209
215
expect ( context . mockTransport ) . toHaveBeenCalledTimes ( 1 ) ;
210
- const {
211
- extra,
212
- breadcrumbs
213
- } = context . mockTransport . mock . calls [ 0 ] [ 0 ] . data ;
216
+ const { extra } = context . mockTransport . mock . calls [ 0 ] [ 0 ] . data ;
214
217
// Even though the action isn't added to breadcrumbs, it should be sent with extra data
215
218
expect ( extra . lastAction ) . toEqual ( { type : "UNINTERESTING_ACTION" } ) ;
216
- expect ( breadcrumbs . values . length ) . toBe ( 2 ) ;
217
219
} ) ;
218
220
} ) ;
219
221
} ) ;
You can’t perform that action at this time.
0 commit comments