Skip to content

Commit b699e7d

Browse files
author
snowplow-loop[bot]
committed
loop: implement snowplow-javascript-tracker (loop/jira-AISP-1625-snowplow-javascript-tracker)
1 parent 53f668a commit b699e7d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

plugins/browser-plugin-media/test/api.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,20 @@ describe('Media Tracking API', () => {
348348
});
349349
});
350350

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+
351365
it('tracks error event', () => {
352366
startMediaTracking({ id, session: false });
353367

0 commit comments

Comments
 (0)