Skip to content

Commit 760df35

Browse files
committed
fix test?
1 parent c31d07f commit 760df35

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/node/test/handlers.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as http from 'http';
77

88
import { NodeClient } from '../src/client';
99
import { errorHandler, requestHandler, tracingHandler } from '../src/handlers';
10-
import * as SDK from '../src/sdk';
1110
import { getDefaultNodeClientOptions } from './helper/node-client-options';
1211

1312
describe('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

Comments
 (0)