normalize args for jsonp, document background option

This commit is contained in:
Leo Horie 2016-12-02 21:19:45 -05:00
parent 50d727d017
commit 0dce0e7911
3 changed files with 102 additions and 8 deletions

View file

@ -329,6 +329,19 @@ o.spec("xhr", function() {
done()
}, 20)
})
o("requests does not trigger finally when background: true", function(done) {
mock.$defineRoutes({
"GET /item": function(request) {
return {status: 200, responseText: "[]"}
}
})
var promise = xhr("/item", {background: true}).then(function() {})
setTimeout(function() {
o(complete.callCount).equals(0)
done()
}, 20)
})
})
o.spec("failure", function() {
o("rejects on server error", function(done) {