ensure http errors reject promises
This commit is contained in:
parent
ea0b661b79
commit
b9cdd940bc
4 changed files with 18 additions and 19 deletions
|
|
@ -88,10 +88,12 @@ mock.window = new function() {
|
|||
}
|
||||
this.send = function() {
|
||||
this.responseText = JSON.stringify(this)
|
||||
request.$events.push({type: "load", target: this})
|
||||
this.readyState = 4
|
||||
this.status = 200
|
||||
request.$instances.push(this)
|
||||
}
|
||||
}
|
||||
request.$events = []
|
||||
request.$instances = []
|
||||
return request
|
||||
}
|
||||
window.location = {search: "", pathname: "", hash: ""},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue