feat: Add support for timeout to m.request (#1966)
This commit is contained in:
parent
a382c85eb0
commit
d50d53f31d
4 changed files with 18 additions and 0 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue