Skip to content

Commit cdf20be

Browse files
authored
fix(browser-extension): Replace browser extension link (#11509)
ref getsentry/sentry-docs#9571
1 parent 1c47e57 commit cdf20be

File tree

4 files changed

+5
-5
lines changed
  • dev-packages/browser-integration-tests/suites/manual-client
  • packages/browser

4 files changed

+5
-5
lines changed

dev-packages/browser-integration-tests/suites/manual-client/skip-init-browser-extension/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sentryTest(
2828
expect(isInitialized).toEqual(false);
2929
expect(errorLogs.length).toEqual(1);
3030
expect(errorLogs[0]).toEqual(
31-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
31+
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
3232
);
3333
},
3434
);

dev-packages/browser-integration-tests/suites/manual-client/skip-init-chrome-extension/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ sentryTest('should not initialize when inside a Chrome browser extension', async
2626
expect(isInitialized).toEqual(false);
2727
expect(errorLogs.length).toEqual(1);
2828
expect(errorLogs[0]).toEqual(
29-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
29+
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
3030
);
3131
});

packages/browser/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function init(browserOptions: BrowserOptions = {}): void {
135135
consoleSandbox(() => {
136136
// eslint-disable-next-line no-console
137137
console.error(
138-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
138+
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
139139
);
140140
});
141141
return;

packages/browser/test/unit/sdk.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ describe('init', () => {
154154

155155
expect(consoleErrorSpy).toBeCalledTimes(1);
156156
expect(consoleErrorSpy).toHaveBeenCalledWith(
157-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
157+
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
158158
);
159159

160160
consoleErrorSpy.mockRestore();
@@ -169,7 +169,7 @@ describe('init', () => {
169169

170170
expect(consoleErrorSpy).toBeCalledTimes(1);
171171
expect(consoleErrorSpy).toHaveBeenCalledWith(
172-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
172+
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
173173
);
174174

175175
consoleErrorSpy.mockRestore();

0 commit comments

Comments
 (0)