Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrums86 committed Mar 12, 2024
1 parent 2a3e20d commit 81dd072
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit 81dd072

Please sign in to comment.