You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'[Sentry] You cannot run Sentry this way in an extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
30
-
);
31
-
});
28
+
expect(isInitialized).toEqual(false);
29
+
expect(errorLogs.length).toEqual(1);
30
+
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',
Copy file name to clipboardExpand all lines: dev-packages/browser-integration-tests/suites/manual-client/skip-init-chrome-extension/test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,6 @@ sentryTest('should not initialize when inside a Chrome browser extension', async
26
26
expect(isInitialized).toEqual(false);
27
27
expect(errorLogs.length).toEqual(1);
28
28
expect(errorLogs[0]).toEqual(
29
-
'[Sentry] You cannot run Sentry this way in an 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/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
'[Sentry] You cannot run Sentry this way in an extension, check: https://docs.sentry.io/platforms/javascript/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
139
+
'[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',
it('should log a browser extension error if executed inside a Chrome extension',()=>{
@@ -159,15 +154,10 @@ describe('init', () => {
159
154
160
155
expect(consoleErrorSpy).toBeCalledTimes(1);
161
156
expect(consoleErrorSpy).toHaveBeenCalledWith(
162
-
'[Sentry] You cannot run Sentry this way in an 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/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
163
158
);
164
159
165
160
consoleErrorSpy.mockRestore();
166
-
167
-
Object.defineProperty(WINDOW,'chrome',{
168
-
value: null,
169
-
writable: true,
170
-
});
171
161
});
172
162
173
163
it('should log a browser extension error if executed inside a Firefox/Safari extension',()=>{
@@ -179,12 +169,20 @@ describe('init', () => {
179
169
180
170
expect(consoleErrorSpy).toBeCalledTimes(1);
181
171
expect(consoleErrorSpy).toHaveBeenCalledWith(
182
-
'[Sentry] You cannot run Sentry this way in an 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/troubleshooting/#setting-up-sentry-in-shared-environments-eg-browser-extensions',
183
173
);
184
174
185
175
consoleErrorSpy.mockRestore();
176
+
});
177
+
178
+
it('should not log a browser extension error if executed inside regular browser environment',()=>{
0 commit comments