Added a method for returning all requests in mock-ajax.
This commit is contained in:
parent
d651885524
commit
50fea7e937
1 changed files with 4 additions and 0 deletions
|
@ -235,6 +235,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
this.at = function(index) {
|
this.at = function(index) {
|
||||||
return requests[index];
|
return requests[index];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.all = function() {
|
||||||
|
return requests.slice(0);
|
||||||
|
};
|
||||||
|
|
||||||
this.filter = function(url_to_match) {
|
this.filter = function(url_to_match) {
|
||||||
if (requests.length == 0) return [];
|
if (requests.length == 0) return [];
|
||||||
|
|
Reference in a new issue