1 | import document from 'global/document';
|
2 |
|
3 | import QUnit from 'qunit';
|
4 | import sinon from 'sinon';
|
5 | import videojs from 'video.js';
|
6 |
|
7 | import handler from '../src/index';
|
8 |
|
9 | QUnit.test('the environment is sane', function(assert) {
|
10 | assert.strictEqual(typeof Array.isArray, 'function', 'es5 exists');
|
11 | assert.strictEqual(typeof sinon, 'object', 'sinon exists');
|
12 | assert.strictEqual(typeof videojs, 'function', 'videojs exists');
|
13 | assert.strictEqual(typeof handler, 'object', 'handler is a function');
|
14 | });
|
15 |
|
16 | QUnit.module('videojs-flashls-source-handler', {
|
17 |
|
18 | beforeEach() {
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | this.clock = sinon.useFakeTimers();
|
25 |
|
26 | this.fixture = document.getElementById('qunit-fixture');
|
27 | this.video = document.createElement('video');
|
28 | this.fixture.appendChild(this.video);
|
29 | this.player = videojs(this.video);
|
30 | },
|
31 |
|
32 | afterEach() {
|
33 | this.player.dispose();
|
34 | this.clock.restore();
|
35 | }
|
36 | });
|
37 |
|