feat: Add support for timeout to m.request (#1966)

This commit is contained in:
Stephan Hoyer 2017-11-14 23:47:02 +01:00 committed by Pat Cavit
parent a382c85eb0
commit d50d53f31d
4 changed files with 18 additions and 0 deletions

View file

@ -435,6 +435,20 @@ o.spec("xhr", function() {
done()
})
})
o("set timeout to xhr instance", function() {
mock.$defineRoutes({
"GET /item": function() {
return {status: 200, responseText: ''}
}
})
return xhr({
method: "GET", url: "/item",
timeout: 42,
config: function(xhr) {
o(xhr.timeout).equals(42)
}
})
})
/*o("data maintains after interpolate", function() {
mock.$defineRoutes({
"PUT /items/:x": function() {