@@ -7,7 +7,6 @@ import * as http from 'http';
7
7
8
8
import { NodeClient } from '../src/client' ;
9
9
import { errorHandler , requestHandler , tracingHandler } from '../src/handlers' ;
10
- import * as SDK from '../src/sdk' ;
11
10
import { getDefaultNodeClientOptions } from './helper/node-client-options' ;
12
11
13
12
describe ( 'requestHandler' , ( ) => {
@@ -111,7 +110,7 @@ describe('requestHandler', () => {
111
110
} ) ;
112
111
113
112
it ( 'patches `res.end` when `flushTimeout` is specified' , done => {
114
- const flush = jest . spyOn ( SDK , 'flush' ) . mockResolvedValue ( true ) ;
113
+ const flush = jest . spyOn ( sentryCore , 'flush' ) . mockResolvedValue ( true ) ;
115
114
116
115
const sentryRequestMiddleware = requestHandler ( { flushTimeout : 1337 } ) ;
117
116
sentryRequestMiddleware ( req , res , next ) ;
@@ -125,7 +124,7 @@ describe('requestHandler', () => {
125
124
} ) ;
126
125
127
126
it ( 'prevents errors thrown during `flush` from breaking the response' , done => {
128
- jest . spyOn ( SDK , 'flush' ) . mockRejectedValue ( new SentryError ( 'HTTP Error (429)' ) ) ;
127
+ jest . spyOn ( sentryCore , 'flush' ) . mockRejectedValue ( new SentryError ( 'HTTP Error (429)' ) ) ;
129
128
130
129
const sentryRequestMiddleware = requestHandler ( { flushTimeout : 1337 } ) ;
131
130
sentryRequestMiddleware ( req , res , next ) ;
0 commit comments