save last call for improve testing
This commit is contained in:
parent
a75aa736d0
commit
ba4bb63f53
@ -2,8 +2,10 @@
|
|||||||
var torque = exports.torque = exports.torque || {};
|
var torque = exports.torque = exports.torque || {};
|
||||||
torque.net = torque.net || {};
|
torque.net = torque.net || {};
|
||||||
|
|
||||||
|
var lastCall = null;
|
||||||
|
|
||||||
function get(url, callback) {
|
function get(url, callback) {
|
||||||
|
lastCall = { url: url, callback: callback };
|
||||||
var request = XMLHttpRequest;
|
var request = XMLHttpRequest;
|
||||||
// from d3.js
|
// from d3.js
|
||||||
if (window.XDomainRequest
|
if (window.XDomainRequest
|
||||||
@ -32,7 +34,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
torque.net = {
|
torque.net = {
|
||||||
get: get
|
get: get,
|
||||||
|
lastCall: function() { return lastCall; }
|
||||||
};
|
};
|
||||||
|
|
||||||
})(typeof exports === "undefined" ? this : exports);
|
})(typeof exports === "undefined" ? this : exports);
|
||||||
|
Loading…
Reference in New Issue
Block a user