Skip to content

Commit 3f3c08e

Browse files
committed
Fix nextjs tests
1 parent 4f04434 commit 3f3c08e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/nextjs/src/index.server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function addServerIntegrations(options: NextjsOptions): void {
129129
if (hasTracingEnabled(options)) {
130130
const defaultHttpTracingIntegration = new Integrations.Http({ tracing: true });
131131
integrations = addOrUpdateIntegration(defaultHttpTracingIntegration, integrations, {
132-
_tracing: true,
132+
_tracing: {},
133133
});
134134
}
135135

packages/nextjs/test/index.server.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe('Server init()', () => {
169169
const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http');
170170

171171
expect(httpIntegration).toBeDefined();
172-
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true }));
172+
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} }));
173173
});
174174

175175
it('adds `Http` integration with tracing enabled if `tracesSampler` is set', () => {
@@ -179,7 +179,7 @@ describe('Server init()', () => {
179179
const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http');
180180

181181
expect(httpIntegration).toBeDefined();
182-
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true }));
182+
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} }));
183183
});
184184

185185
it('does not add `Http` integration if tracing not enabled in SDK', () => {
@@ -201,7 +201,7 @@ describe('Server init()', () => {
201201
const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http');
202202

203203
expect(httpIntegration).toBeDefined();
204-
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true }));
204+
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} }));
205205
});
206206

207207
it('forces `_tracing = true` if `tracesSampler` is set', () => {
@@ -214,7 +214,7 @@ describe('Server init()', () => {
214214
const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http');
215215

216216
expect(httpIntegration).toBeDefined();
217-
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true }));
217+
expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} }));
218218
});
219219

220220
it('does not force `_tracing = true` if tracing not enabled in SDK', () => {

0 commit comments

Comments
 (0)