Added a method for returning all requests in mock-ajax.

This commit is contained in:
Scott Erickson 2014-06-17 16:40:34 -04:00
parent d651885524
commit 50fea7e937

View file

@ -236,6 +236,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
return requests[index];
};
this.all = function() {
return requests.slice(0);
};
this.filter = function(url_to_match) {
if (requests.length == 0) return [];
var matching_requests = [];