|
1 | | -import { Event } from '@sentry/types'; |
| 1 | +import { ReplayEvent } from '@sentry/types'; |
2 | 2 | import { makeDsn } from '@sentry/utils'; |
3 | 3 |
|
4 | 4 | import { createReplayEnvelope } from '../../../src/util/createReplayEnvelope'; |
5 | 5 |
|
6 | 6 | describe('createReplayEnvelope', () => { |
7 | 7 | const REPLAY_ID = 'MY_REPLAY_ID'; |
8 | 8 |
|
9 | | - const replayEvent = { |
| 9 | + const replayEvent: ReplayEvent = { |
| 10 | + // @ts-ignore private api |
10 | 11 | type: 'replay_event', |
11 | 12 | timestamp: 1670837008.634, |
12 | 13 | error_ids: ['errorId'], |
@@ -41,7 +42,7 @@ describe('createReplayEnvelope', () => { |
41 | 42 | }); |
42 | 43 |
|
43 | 44 | it('creates an envelope for a given Replay event', () => { |
44 | | - const envelope = createReplayEnvelope(replayEvent as Event, payloadWithSequence, dsn); |
| 45 | + const envelope = createReplayEnvelope(replayEvent, payloadWithSequence, dsn); |
45 | 46 |
|
46 | 47 | expect(envelope).toEqual([ |
47 | 48 | { |
@@ -73,7 +74,7 @@ describe('createReplayEnvelope', () => { |
73 | 74 | }); |
74 | 75 |
|
75 | 76 | it('creates an envelope with the `dsn` key in the header if `tunnel` is specified', () => { |
76 | | - const envelope = createReplayEnvelope(replayEvent as Event, payloadWithSequence, dsn, '/my-tunnel-endpoint'); |
| 77 | + const envelope = createReplayEnvelope(replayEvent, payloadWithSequence, dsn, '/my-tunnel-endpoint'); |
77 | 78 |
|
78 | 79 | expect(envelope).toEqual([ |
79 | 80 | { |
|
0 commit comments