Skip to content

Commit 5ec402d

Browse files
authored
test(astro): Remove old BrowserTracing test (#10622)
1 parent 32940a8 commit 5ec402d

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

packages/astro/src/client/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
import { applySdkMetadata, hasTracingEnabled } from '@sentry/core';
99
import type { Integration } from '@sentry/types';
1010

11-
// Treeshakable guard to remove all code related to tracing
11+
// Tree-shakable guard to remove all code related to tracing
1212
declare const __SENTRY_TRACING__: boolean;
1313

1414
/**

packages/astro/test/client/sdk.test.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { BrowserClient } from '@sentry/browser';
22
import { getActiveSpan } from '@sentry/browser';
33
import { browserTracingIntegration } from '@sentry/browser';
44
import * as SentryBrowser from '@sentry/browser';
5-
import { BrowserTracing, SDK_VERSION, WINDOW, getClient } from '@sentry/browser';
5+
import { SDK_VERSION, WINDOW, getClient } from '@sentry/browser';
66
import { vi } from 'vitest';
77

88
import { getIsolationScope } from '@sentry/core';
@@ -102,27 +102,6 @@ describe('Sentry client SDK', () => {
102102
delete globalThis.__SENTRY_TRACING__;
103103
});
104104

105-
it('Overrides the automatically default BrowserTracing instance with a a user-provided BrowserTracing instance', () => {
106-
init({
107-
dsn: 'https://[email protected]/1337',
108-
// eslint-disable-next-line deprecation/deprecation
109-
integrations: [new BrowserTracing({ finalTimeout: 10, startTransactionOnLocationChange: false })],
110-
enableTracing: true,
111-
});
112-
113-
const integrationsToInit = browserInit.mock.calls[0][0]?.defaultIntegrations;
114-
115-
// eslint-disable-next-line deprecation/deprecation
116-
const browserTracing = getClient<BrowserClient>()?.getIntegrationByName('BrowserTracing') as BrowserTracing;
117-
const options = browserTracing.options;
118-
119-
expect(integrationsToInit).toContainEqual(expect.objectContaining({ name: 'BrowserTracing' }));
120-
expect(browserTracing).toBeDefined();
121-
122-
// This shows that the user-configured options are still here
123-
expect(options.finalTimeout).toEqual(10);
124-
});
125-
126105
it('Overrides the automatically default BrowserTracing instance with a a user-provided browserTracingIntegration instance', () => {
127106
init({
128107
dsn: 'https://[email protected]/1337',

0 commit comments

Comments
 (0)