@@ -7,7 +7,6 @@ import * as http from 'http';
77
88import { NodeClient } from '../src/client' ;
99import { errorHandler , requestHandler , tracingHandler } from '../src/handlers' ;
10- import * as SDK from '../src/sdk' ;
1110import { getDefaultNodeClientOptions } from './helper/node-client-options' ;
1211
1312describe ( 'requestHandler' , ( ) => {
@@ -111,7 +110,7 @@ describe('requestHandler', () => {
111110 } ) ;
112111
113112 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 ) ;
115114
116115 const sentryRequestMiddleware = requestHandler ( { flushTimeout : 1337 } ) ;
117116 sentryRequestMiddleware ( req , res , next ) ;
@@ -125,7 +124,7 @@ describe('requestHandler', () => {
125124 } ) ;
126125
127126 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)' ) ) ;
129128
130129 const sentryRequestMiddleware = requestHandler ( { flushTimeout : 1337 } ) ;
131130 sentryRequestMiddleware ( req , res , next ) ;
0 commit comments