Commit b53e74be by Romain Courteaud

[jio] Fix XMLHttpRequest global

sinon now correctly replace it only on demand.
1 parent f9cfbc47
......@@ -220,8 +220,8 @@
}(window, WeakMap, ArrayBuffer, Uint8Array));
var XMLHttpRequest = global.XMLHttpRequest || module.exports,
Blob = window.Blob,
global.XMLHttpRequest = module.exports;
var Blob = window.Blob,
atob = window.atob,
btoa = window.btoa,
FileReader = window.FileReader,
......
......@@ -21,15 +21,14 @@
(function (require, global, Object) {
"use strict";
var sinon = require('./sinon-require'),
jIO;
global.sinon = sinon;
global.XMLHttpRequest = sinon.FakeXMLHttpRequest;
jIO = require('../../dist/jio-latest-node');
var sinon,
jIO = require('../../dist/jio-latest-node');
global.jIO = jIO;
Object.keys(jIO.node_env).forEach(function (key) {
global[key] = jIO.node_env[key];
});
sinon = require('./sinon-require');
global.sinon = sinon;
}(require, global, Object));
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!