1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-04 06:48:49 +02:00
video.js/test/unit/setup.test.js

15 lines
489 B
JavaScript
Raw Normal View History

import TestHelpers from './test-helpers.js';
q.module('Setup');
test('should set options from data-setup even if autoSetup is not called before initialisation', function(){
var el = TestHelpers.makeTag();
el.setAttribute('data-setup', '{"controls": true, "autoplay": false, "preload": "auto"}');
var player = TestHelpers.makePlayer({}, el);
ok(player.options_['controls'] === true);
ok(player.options_['autoplay'] === false);
ok(player.options_['preload'] === 'auto');
});