Update promise.finally test for non-propagation of promise value to finally callback.
This commit is contained in:
parent
1dc8c31632
commit
937b20984d
1 changed files with 2 additions and 2 deletions
|
|
@ -3916,11 +3916,11 @@ function testMithril(mock) {
|
||||||
return prop().message === "error occurred" && error().message === "error occurred"
|
return prop().message === "error occurred" && error().message === "error occurred"
|
||||||
})
|
})
|
||||||
test(function() {
|
test(function() {
|
||||||
// Data returned by then() functions propagate to finally().
|
// Data returned by then() functions do *not* propagate to finally().
|
||||||
var data = m.prop("");
|
var data = m.prop("");
|
||||||
var prop = m.request({method: "GET", url: "test"}).then(function() {return "foo"})["finally"](data)
|
var prop = m.request({method: "GET", url: "test"}).then(function() {return "foo"})["finally"](data)
|
||||||
mock.XMLHttpRequest.$instances.pop().onreadystatechange()
|
mock.XMLHttpRequest.$instances.pop().onreadystatechange()
|
||||||
return prop() === "foo" && data() === "foo"
|
return prop() === "foo" && data() === ""
|
||||||
})
|
})
|
||||||
test(function() {
|
test(function() {
|
||||||
// Data returned by finally() functions do *not* propagate to next promise.
|
// Data returned by finally() functions do *not* propagate to next promise.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue