From 3f3c08ef0e7c959ba059847c40fb5240cc257846 Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Fri, 11 Nov 2022 14:16:42 +0100 Subject: [PATCH] Fix nextjs tests --- packages/nextjs/src/index.server.ts | 2 +- packages/nextjs/test/index.server.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/nextjs/src/index.server.ts b/packages/nextjs/src/index.server.ts index 0191a5334b2d..c1efd2e300d3 100644 --- a/packages/nextjs/src/index.server.ts +++ b/packages/nextjs/src/index.server.ts @@ -129,7 +129,7 @@ function addServerIntegrations(options: NextjsOptions): void { if (hasTracingEnabled(options)) { const defaultHttpTracingIntegration = new Integrations.Http({ tracing: true }); integrations = addOrUpdateIntegration(defaultHttpTracingIntegration, integrations, { - _tracing: true, + _tracing: {}, }); } diff --git a/packages/nextjs/test/index.server.test.ts b/packages/nextjs/test/index.server.test.ts index d432b61eb16e..8432c7fa201e 100644 --- a/packages/nextjs/test/index.server.test.ts +++ b/packages/nextjs/test/index.server.test.ts @@ -169,7 +169,7 @@ describe('Server init()', () => { const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http'); expect(httpIntegration).toBeDefined(); - expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true })); + expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} })); }); it('adds `Http` integration with tracing enabled if `tracesSampler` is set', () => { @@ -179,7 +179,7 @@ describe('Server init()', () => { const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http'); expect(httpIntegration).toBeDefined(); - expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true })); + expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} })); }); it('does not add `Http` integration if tracing not enabled in SDK', () => { @@ -201,7 +201,7 @@ describe('Server init()', () => { const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http'); expect(httpIntegration).toBeDefined(); - expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true })); + expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} })); }); it('forces `_tracing = true` if `tracesSampler` is set', () => { @@ -214,7 +214,7 @@ describe('Server init()', () => { const httpIntegration = findIntegrationByName(nodeInitOptions.integrations, 'Http'); expect(httpIntegration).toBeDefined(); - expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: true })); + expect(httpIntegration).toEqual(expect.objectContaining({ _tracing: {} })); }); it('does not force `_tracing = true` if tracing not enabled in SDK', () => {