Skip to content

Commit f0036a2

Browse files
committed
ref: Split replay integration & container class
1 parent 6e09ffe commit f0036a2

11 files changed

+1357
-1292
lines changed

packages/replay/jest.setup.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { getCurrentHub } from '@sentry/core';
33
import { Transport } from '@sentry/types';
44

5-
import { Replay } from './src';
5+
import { ReplayContainer } from './src/replay';
66
import { Session } from './src/session/Session';
77

88
// @ts-ignore TS error, this is replaced in prod builds bc of rollup
@@ -54,7 +54,7 @@ type SentReplayExpected = {
5454
};
5555

5656
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
57-
const toHaveSameSession = function (received: jest.Mocked<Replay>, expected: undefined | Session) {
57+
const toHaveSameSession = function (received: jest.Mocked<ReplayContainer>, expected: undefined | Session) {
5858
const pass = this.equals(received.session?.id, expected?.id) as boolean;
5959

6060
const options = {
@@ -77,7 +77,7 @@ const toHaveSameSession = function (received: jest.Mocked<Replay>, expected: und
7777
*/
7878
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
7979
const toHaveSentReplay = function (
80-
_received: jest.Mocked<Replay>,
80+
_received: jest.Mocked<ReplayContainer>,
8181
expected?: SentReplayExpected | { sample: SentReplayExpected; inverse: boolean },
8282
) {
8383
const { calls } = (getCurrentHub().getClient()?.getTransport()?.send as MockTransport).mock;

0 commit comments

Comments
 (0)