mirror of
https://github.com/videojs/video.js.git
synced 2024-12-23 02:04:34 +02:00
19 lines
584 B
JavaScript
19 lines
584 B
JavaScript
/* eslint-env qunit */
|
|
import TestHelpers from './test-helpers.js';
|
|
|
|
QUnit.module('Setup');
|
|
|
|
QUnit.test('should set options from data-setup even if autoSetup is not called before initialisation', function(assert) {
|
|
const el = TestHelpers.makeTag();
|
|
|
|
el.setAttribute('data-setup',
|
|
'{"controls": true, "autoplay": false, "preload": "auto"}');
|
|
|
|
const player = TestHelpers.makePlayer({}, el);
|
|
|
|
assert.ok(player.options_.controls === true);
|
|
assert.ok(player.options_.autoplay === false);
|
|
assert.ok(player.options_.preload === 'auto');
|
|
player.dispose();
|
|
});
|