Skip to content

Commit a33ce01

Browse files
committed
revert hack
1 parent 0c2c609 commit a33ce01

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/replay-internal/test/integration/coreHandlers/handleAfterSendEvent.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ describe('Integration | coreHandlers | handleAfterSendEvent', () => {
169169

170170
expect(Array.from(replay.getContext().errorIds)).toEqual(['err1']);
171171

172-
// This is a bit flakey: handleAfterSendEvent calls
173-
// `sendBufferedReplayOrFlush`, which flushes immediately but also
174-
// calls `startRecording` which eventually triggers another flush after
175-
// flush delay. I'm unable to get stable timer controls, so just
176-
// testing the end result, which is that send gets called twice.
172+
// handleAfterSendEvent calls `sendBufferedReplayOrFlush`, which
173+
// flushes immediately but also calls `startRecording` which eventually
174+
// triggers another flush after flush delay.
177175
await vi.runOnlyPendingTimersAsync();
176+
expect(mockSend).toHaveBeenCalledTimes(1);
177+
178178
await vi.runOnlyPendingTimersAsync();
179179
expect(mockSend).toHaveBeenCalledTimes(2);
180180

0 commit comments

Comments
 (0)