Files
video.js/test/globals-shim.js
T

20 lines
645 B
JavaScript
Raw Normal View History

2016-08-03 15:27:03 -04:00
/* eslint-env qunit */
2017-01-19 11:17:46 -05:00
import 'es5-shim';
import 'es6-shim';
2015-05-21 21:46:36 -07:00
import document from 'global/document';
import window from 'global/window';
import sinon from 'sinon';
window.q = QUnit;
window.sinon = sinon;
2015-07-07 18:27:20 -04:00
// 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');
2015-05-21 21:46:36 -07:00
window.fixture.id = 'qunit-fixture';
document.body.appendChild(window.fixture);