Skip to content

Commit d157b23

Browse files
committed
fix circular package dependency
1 parent 5ebe8a2 commit d157b23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/tracing/test/hub.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,12 @@ describe('Hub', () => {
107107
active: { members: [mockRequestObject, mockResponseObject] },
108108
};
109109

110+
// Ideally we'd use a NodeClient here, but @sentry/tracing can't depend on @sentry/node since the reverse is
111+
// already true (node's request handlers start their own transactions) - even as a dev dependency. Fortunately,
112+
// we're not relying on anything other than the client having a captureEvent method, which all clients do (it's
113+
// in the abstract base class), so a BrowserClient will do.
110114
const tracesSampler = jest.fn();
111-
const hub = new Hub(new NodeClient({ tracesSampler }));
115+
const hub = new Hub(new BrowserClient({ tracesSampler }));
112116
hub.startTransaction({ name: 'dogpark' });
113117

114118
// post-normalization request object

0 commit comments

Comments
 (0)