Skip to content

Commit edd3a9b

Browse files
committed
Fix replay test
1 parent ab42305 commit edd3a9b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/replay-internal/test/integration/sendReplayEvent.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,9 @@ describe('Integration | sendReplayEvent', () => {
397397
// Retries = 3 (total tries = 4 including initial attempt)
398398
// + last exception is max retries exceeded
399399
expect(spyHandleException).toHaveBeenCalledTimes(5);
400-
expect(spyHandleException).toHaveBeenLastCalledWith(new Error('Unable to send Replay - max retries exceeded'));
400+
const expectedError = new Error('Unable to send Replay - max retries exceeded');
401+
(expectedError as any).cause = new Error('Something bad happened');
402+
expect(spyHandleException).toHaveBeenLastCalledWith(expectedError);
401403

402404
const spyHandleExceptionCall = spyHandleException.mock.calls;
403405
expect(spyHandleExceptionCall[spyHandleExceptionCall.length - 1][0]?.cause.message).toEqual(

0 commit comments

Comments
 (0)