1 parent 53f668a commit b699e7dCopy full SHA for b699e7d
1 file changed
plugins/browser-plugin-media/test/api.test.ts
@@ -348,6 +348,20 @@ describe('Media Tracking API', () => {
348
});
349
350
351
+ it('strips empty string label from media player entity when updated mid-session via updateMediaTracking', () => {
352
+ startMediaTracking({
353
+ id,
354
+ session: false,
355
+ player: { label: 'My Video' },
356
+ });
357
+
358
+ updateMediaTracking({ id, player: { label: '' } });
359
+ trackMediaPlay({ id });
360
361
+ const playerContext = eventQueue[0].context[0].data;
362
+ expect(playerContext).not.toHaveProperty('label');
363
364
365
it('tracks error event', () => {
366
startMediaTracking({ id, session: false });
367
0 commit comments