mirror of
https://github.com/videojs/video.js.git
synced 2024-11-30 09:06:49 +02:00
7bafcc2a55
* Switch to es3 preset for babel so that it runs last. Plugins run before presets and presets run in reverse order. Also, we ran into a weird bug in babel that causes `default` not to be quoted in some cases (https://github.com/babel/babel/issues/4799) which we've worked around here. * Restore the es-shims for tests and the ie8 fallback script. * Do a null-check around `Player.players`. * use more round fractions (like 0.5 and 1) to avoid rounding issues.
20 lines
645 B
JavaScript
20 lines
645 B
JavaScript
/* eslint-env qunit */
|
|
import 'es5-shim';
|
|
import 'es6-shim';
|
|
import document from 'global/document';
|
|
import window from 'global/window';
|
|
import sinon from 'sinon';
|
|
|
|
window.q = QUnit;
|
|
window.sinon = sinon;
|
|
|
|
// There's nowhere we require completing xhr requests
|
|
// and raynos/xhr doesn't want to make stubbing easy (Raynos/xhr#11)
|
|
// so we need to stub XHR before the xhr module is included anywhere else.
|
|
window.xhr = sinon.useFakeXMLHttpRequest();
|
|
|
|
// This may not be needed anymore, but double check before removing
|
|
window.fixture = document.createElement('div');
|
|
window.fixture.id = 'qunit-fixture';
|
|
document.body.appendChild(window.fixture);
|