We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5eedd8 commit 795a4cbCopy full SHA for 795a4cb
packages/replay/jest.setup.ts
@@ -2,6 +2,7 @@
2
import { getCurrentHub } from '@sentry/core';
3
import type { ReplayRecordingData, Transport } from '@sentry/types';
4
import { TextEncoder } from 'util';
5
+import * as SentryUtils from '@sentry/utils';
6
7
import type { ReplayContainer, Session } from './src/types';
8
@@ -10,13 +11,7 @@ import type { ReplayContainer, Session } from './src/types';
10
11
12
type MockTransport = jest.MockedFunction<Transport['send']>;
13
-jest.mock('@sentry/utils', () => {
14
- const original = jest.requireActual('@sentry/utils');
15
- return {
16
- ...original,
17
- isBrowser: () => true,
18
- };
19
-});
+jest.spyOn(SentryUtils, 'isBrowser').mockImplementation(() => true);
20
21
type EnvelopeHeader = {
22
event_id: string;
0 commit comments