Skip to content

Commit 228c038

Browse files
committed
fix tests & lint
1 parent 7e5d1f9 commit 228c038

File tree

4 files changed

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

4 files changed

+6
-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
@@ -23,7 +23,7 @@ sentryTest(
2323
if (hasDebugLogs()) {
2424
expect(errorLogs.length).toEqual(1);
2525
expect(errorLogs[0]).toEqual(
26-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
26+
'[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
2727
);
2828
} else {
2929
expect(errorLogs.length).toEqual(0);

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
@@ -21,7 +21,7 @@ sentryTest('should not initialize when inside a Chrome browser extension', async
2121
if (hasDebugLogs()) {
2222
expect(errorLogs.length).toEqual(1);
2323
expect(errorLogs[0]).toEqual(
24-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
24+
'[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
2525
);
2626
} else {
2727
expect(errorLogs.length).toEqual(0);

packages/browser/src/sdk.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { Client, Integration, Options, ReportDialogOptions, getClient } from '@sentry/core';
1+
import type { Client, Integration, Options, ReportDialogOptions } from '@sentry/core';
22
import {
33
consoleSandbox,
44
dedupeIntegration,
55
functionToStringIntegration,
6+
getClient,
67
getCurrentScope,
78
getIntegrationsToSetup,
89
getLocationHref,

packages/browser/test/sdk.test.ts

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

159159
expect(consoleErrorSpy).toBeCalledTimes(1);
160160
expect(consoleErrorSpy).toHaveBeenCalledWith(
161-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
161+
'[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
162162
);
163163
});
164164

@@ -171,7 +171,7 @@ describe('init', () => {
171171

172172
expect(consoleErrorSpy).toBeCalledTimes(1);
173173
expect(consoleErrorSpy).toHaveBeenCalledWith(
174-
'[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
174+
'[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/',
175175
);
176176
});
177177

0 commit comments

Comments
 (0)