@@ -196,6 +196,7 @@ describe("raven-for-redux", () => {
196
196
action => `transformed action ${ action . type } `
197
197
) ;
198
198
context . getUserContext = jest . fn ( state => `user context ${ state . value } ` ) ;
199
+ context . getTags = jest . fn ( state => `tags ${ state . value } ` ) ;
199
200
context . breadcrumbDataFromAction = jest . fn ( action => ( {
200
201
extra : action . extra
201
202
} ) ) ;
@@ -211,7 +212,8 @@ describe("raven-for-redux", () => {
211
212
actionTransformer : context . actionTransformer ,
212
213
breadcrumbDataFromAction : context . breadcrumbDataFromAction ,
213
214
filterBreadcrumbActions : context . filterBreadcrumbActions ,
214
- getUserContext : context . getUserContext
215
+ getUserContext : context . getUserContext ,
216
+ getTags : context . getTags
215
217
} )
216
218
)
217
219
) ;
@@ -265,6 +267,16 @@ describe("raven-for-redux", () => {
265
267
"user context 1"
266
268
) ;
267
269
} ) ;
270
+ it ( "transforms the tags on data callback" , ( ) => {
271
+ context . store . dispatch ( { type : "INCREMENT" , extra : "FOO" } ) ;
272
+ expect ( ( ) => {
273
+ context . store . dispatch ( { type : "THROW" , extra : "BAR" } ) ;
274
+ } ) . toThrow ( ) ;
275
+ expect ( context . mockTransport ) . toHaveBeenCalledTimes ( 1 ) ;
276
+ expect ( context . mockTransport . mock . calls [ 0 ] [ 0 ] . data . tags ) . toEqual (
277
+ "tags 1"
278
+ ) ;
279
+ } ) ;
268
280
} ) ;
269
281
describe ( "with multiple data callbaks" , ( ) => {
270
282
beforeEach ( ( ) => {
0 commit comments