diff --git a/packages/rum/src/boot/recorderApi.spec.ts b/packages/rum/src/boot/recorderApi.spec.ts index 87a0e756ae..5a0cd972bb 100644 --- a/packages/rum/src/boot/recorderApi.spec.ts +++ b/packages/rum/src/boot/recorderApi.spec.ts @@ -463,9 +463,11 @@ describe('makeRecorderApi', () => { describe('isRecording', () => { it('is false when recording has not been started', () => { - setupRecorderApi() + setupRecorderApi({ startSessionReplayRecordingManually: true }) rumInit() + mockWorker.processAllMessages() + expect(recorderApi.isRecording()).toBeFalse() }) @@ -518,9 +520,12 @@ describe('makeRecorderApi', () => { const VIEW_ID = 'xxx' it('is undefined when recording has not been started', () => { - setupRecorderApi() + setupRecorderApi({ startSessionReplayRecordingManually: true }) rumInit() + replayStats.addSegment(VIEW_ID) + mockWorker.processAllMessages() + expect(recorderApi.getReplayStats(VIEW_ID)).toBeUndefined() })