File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -283,18 +283,6 @@ describe('requestHandler', () => {
283
283
done ( ) ;
284
284
} ) ;
285
285
} ) ;
286
-
287
- it ( 'patches `res.end`' , ( ) => {
288
- const flush = jest . spyOn ( SDK , 'flush' ) . mockResolvedValue ( true ) ;
289
-
290
- sentryRequestMiddleware ( req , res , next ) ;
291
- res . end ( 'ok' ) ;
292
-
293
- setImmediate ( ( ) => {
294
- expect ( flush ) . toHaveBeenCalled ( ) ;
295
- expect ( res . finished ) . toBe ( true ) ;
296
- } ) ;
297
- } ) ;
298
286
299
287
it ( 'patches `res.end` when `flushTimeout` is specified' , ( ) => {
300
288
const flush = jest . spyOn ( SDK , 'flush' ) . mockResolvedValue ( true ) ;
@@ -312,6 +300,7 @@ describe('requestHandler', () => {
312
300
it ( 'prevents errors thrown during `flush` from breaking the response' , async ( ) => {
313
301
jest . spyOn ( SDK , 'flush' ) . mockRejectedValue ( new SentryError ( 'HTTP Error (429)' ) ) ;
314
302
303
+ const sentryRequestMiddleware = requestHandler ( { flushTimeout : 1337 } ) ;
315
304
sentryRequestMiddleware ( req , res , next ) ;
316
305
res . end ( 'ok' ) ;
317
306
You can’t perform that action at this time.
0 commit comments