From 81dd0725e0af9b636884e89698887c21b481ef1c Mon Sep 17 00:00:00 2001 From: Adam Waldron Date: Mon, 11 Mar 2024 20:27:20 -0700 Subject: [PATCH] add test --- test/plugin.test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/plugin.test.js b/test/plugin.test.js index 838c88c..8a0ca38 100644 --- a/test/plugin.test.js +++ b/test/plugin.test.js @@ -430,6 +430,21 @@ QUnit.test('handleEncryptedEvent checks for required options', function(assert) }); }); +QUnit.test('handleEncryptedEvent checks for legacy fairplay', function(assert) { + const done = assert.async(); + const sessions = []; + const options = { + keySystems: { + 'com.apple.fps.1_0': {url: 'some-url'} + } + }; + + handleEncryptedEvent(this.player, this.event1, options, sessions).then(() => { + assert.equal(sessions.length, 0, 'did not create a session when no options'); + done(); + }); +}); + QUnit.test('handleEncryptedEvent checks for required init data', function(assert) { const done = assert.async(); const sessions = [];