Update promise.finally test for non-propagation of promise value to finally callback.

This commit is contained in:
Derrick Gilland 2015-07-27 11:29:08 -04:00
parent 1dc8c31632
commit 937b20984d

View file

@ -3916,11 +3916,11 @@ function testMithril(mock) {
return prop().message === "error occurred" && error().message === "error occurred"
})
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 prop = m.request({method: "GET", url: "test"}).then(function() {return "foo"})["finally"](data)
mock.XMLHttpRequest.$instances.pop().onreadystatechange()
return prop() === "foo" && data() === "foo"
return prop() === "foo" && data() === ""
})
test(function() {
// Data returned by finally() functions do *not* propagate to next promise.