зеркало из https://github.com/github/fetch.git
Track mock requests.
This commit is contained in:
Родитель
affb781dcd
Коммит
c38cfe25fc
|
@ -1,4 +1,5 @@
|
|||
function MockXHR() {
|
||||
MockXHR.requests.push(this)
|
||||
this.method = null
|
||||
this.url = null
|
||||
this.data = null
|
||||
|
@ -8,8 +9,13 @@ function MockXHR() {
|
|||
this.responseText = null
|
||||
}
|
||||
|
||||
MockXHR.requests = []
|
||||
MockXHR.responses = {}
|
||||
|
||||
MockXHR.last = function() {
|
||||
return MockXHR.requests[MockXHR.requests.length - 1]
|
||||
}
|
||||
|
||||
MockXHR.prototype.open = function(method, url) {
|
||||
this.method = method
|
||||
this.url = url
|
||||
|
|
Загрузка…
Ссылка в новой задаче