@@ -96,7 +96,7 @@ describe('Integration | sendReplayEvent', () => {
9696
9797 expect ( mockRecord . takeFullSnapshot ) . not . toHaveBeenCalled ( ) ;
9898
99- expect ( replay ) . toHaveLastSentReplay ( { events : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
99+ expect ( replay ) . toHaveLastSentReplay ( { recordingData : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
100100
101101 // Session's last activity is not updated because we do not consider
102102 // visibilitystate as user being active
@@ -136,7 +136,7 @@ describe('Integration | sendReplayEvent', () => {
136136
137137 expect ( mockRecord . takeFullSnapshot ) . not . toHaveBeenCalled ( ) ;
138138
139- expect ( replay ) . toHaveLastSentReplay ( { events : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
139+ expect ( replay ) . toHaveLastSentReplay ( { recordingData : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
140140
141141 // No user activity to trigger an update
142142 expect ( replay . session ?. lastActivity ) . toBe ( BASE_TIMESTAMP ) ;
@@ -160,7 +160,7 @@ describe('Integration | sendReplayEvent', () => {
160160 await new Promise ( process . nextTick ) ;
161161
162162 expect ( replay ) . toHaveLastSentReplay ( {
163- events : JSON . stringify ( [ ...Array ( 5 ) ] . map ( ( ) => TEST_EVENT ) ) ,
163+ recordingData : JSON . stringify ( [ ...Array ( 5 ) ] . map ( ( ) => TEST_EVENT ) ) ,
164164 } ) ;
165165
166166 // There should also not be another attempt at an upload 5 seconds after the last replay event
@@ -177,7 +177,7 @@ describe('Integration | sendReplayEvent', () => {
177177 mockTransportSend . mockClear ( ) ;
178178 mockRecord . _emitter ( TEST_EVENT ) ;
179179 await advanceTimers ( DEFAULT_FLUSH_MIN_DELAY ) ;
180- expect ( replay ) . toHaveLastSentReplay ( { events : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
180+ expect ( replay ) . toHaveLastSentReplay ( { recordingData : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
181181 } ) ;
182182
183183 it ( 'uploads a replay event when WINDOW is blurred' , async ( ) => {
@@ -211,7 +211,7 @@ describe('Integration | sendReplayEvent', () => {
211211 await new Promise ( process . nextTick ) ;
212212 expect ( mockRecord . takeFullSnapshot ) . not . toHaveBeenCalled ( ) ;
213213 expect ( replay ) . toHaveLastSentReplay ( {
214- events : JSON . stringify ( [ TEST_EVENT , hiddenBreadcrumb ] ) ,
214+ recordingData : JSON . stringify ( [ TEST_EVENT , hiddenBreadcrumb ] ) ,
215215 } ) ;
216216 // Session's last activity should not be updated
217217 expect ( replay . session ?. lastActivity ) . toBe ( BASE_TIMESTAMP ) ;
@@ -238,7 +238,7 @@ describe('Integration | sendReplayEvent', () => {
238238 await new Promise ( process . nextTick ) ;
239239
240240 expect ( mockRecord . takeFullSnapshot ) . not . toHaveBeenCalled ( ) ;
241- expect ( replay ) . toHaveLastSentReplay ( { events : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
241+ expect ( replay ) . toHaveLastSentReplay ( { recordingData : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
242242
243243 // Session's last activity is not updated because we do not consider
244244 // visibilitystate as user being active
@@ -256,7 +256,7 @@ describe('Integration | sendReplayEvent', () => {
256256
257257 expect ( mockRecord . takeFullSnapshot ) . not . toHaveBeenCalled ( ) ;
258258 expect ( mockTransportSend ) . toHaveBeenCalledTimes ( 1 ) ;
259- expect ( replay ) . toHaveLastSentReplay ( { events : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
259+ expect ( replay ) . toHaveLastSentReplay ( { recordingData : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
260260
261261 // No user activity to trigger an update
262262 expect ( replay . session ?. lastActivity ) . toBe ( BASE_TIMESTAMP ) ;
@@ -280,7 +280,7 @@ describe('Integration | sendReplayEvent', () => {
280280 await new Promise ( process . nextTick ) ;
281281
282282 expect ( replay ) . toHaveLastSentReplay ( {
283- events : JSON . stringify ( [ ...Array ( 5 ) ] . map ( ( ) => TEST_EVENT ) ) ,
283+ recordingData : JSON . stringify ( [ ...Array ( 5 ) ] . map ( ( ) => TEST_EVENT ) ) ,
284284 } ) ;
285285
286286 // There should also not be another attempt at an upload 5 seconds after the last replay event
@@ -298,7 +298,7 @@ describe('Integration | sendReplayEvent', () => {
298298 mockTransportSend . mockClear ( ) ;
299299 mockRecord . _emitter ( TEST_EVENT ) ;
300300 await advanceTimers ( DEFAULT_FLUSH_MIN_DELAY ) ;
301- expect ( replay ) . toHaveLastSentReplay ( { events : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
301+ expect ( replay ) . toHaveLastSentReplay ( { recordingData : JSON . stringify ( [ TEST_EVENT ] ) } ) ;
302302 } ) ;
303303
304304 it ( 'uploads a dom breadcrumb 5 seconds after listener receives an event' , async ( ) => {
@@ -311,7 +311,7 @@ describe('Integration | sendReplayEvent', () => {
311311 await advanceTimers ( ELAPSED ) ;
312312
313313 expect ( replay ) . toHaveLastSentReplay ( {
314- events : JSON . stringify ( [
314+ recordingData : JSON . stringify ( [
315315 {
316316 type : 5 ,
317317 timestamp : BASE_TIMESTAMP ,
@@ -369,7 +369,7 @@ describe('Integration | sendReplayEvent', () => {
369369 urls : [ 'http://localhost/' ] ,
370370 } ) ,
371371 recordingPayloadHeader : { segment_id : 0 } ,
372- events : JSON . stringify ( [ TEST_EVENT ] ) ,
372+ recordingData : JSON . stringify ( [ TEST_EVENT ] ) ,
373373 } ) ;
374374
375375 mockTransportSend . mockClear ( ) ;
0 commit comments