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 || {};
|
||||
torque.net = torque.net || {};
|
||||
|
||||
var lastCall = null;
|
||||
|
||||
function get(url, callback) {
|
||||
lastCall = { url: url, callback: callback };
|
||||
var request = XMLHttpRequest;
|
||||
// from d3.js
|
||||
if (window.XDomainRequest
|
||||
@ -32,7 +34,8 @@
|
||||
}
|
||||
|
||||
torque.net = {
|
||||
get: get
|
||||
get: get,
|
||||
lastCall: function() { return lastCall; }
|
||||
};
|
||||
|
||||
})(typeof exports === "undefined" ? this : exports);
|
||||
|
Loading…
Reference in New Issue
Block a user