1
0
mirror of https://github.com/videojs/video.js.git synced 2026-06-17 22:06:55 +02:00
Files
video.js/test/unit/setup.test.js
T

20 lines
656 B
JavaScript
Raw Normal View History

2016-08-03 15:27:03 -04:00
/* eslint-env qunit */
2015-03-25 21:43:41 -07:00
import TestHelpers from './test-helpers.js';
2016-08-03 15:27:03 -04:00
QUnit.module('Setup');
QUnit.test('should set options from data-setup even if autoSetup is not called before initialisation', function(assert) {
2016-08-03 15:27:03 -04:00
const el = TestHelpers.makeTag();
2016-08-03 15:27:03 -04:00
el.setAttribute('data-setup',
'{"controls": true, "autoplay": false, "preload": "auto", "playsinline": true}');
2016-08-03 15:27:03 -04:00
const player = TestHelpers.makePlayer({}, el);
assert.ok(player.options_.controls === true);
assert.ok(player.options_.autoplay === false);
assert.ok(player.options_.preload === 'auto');
assert.ok(player.options_.playsinline === true);
player.dispose();
});