Merge pull request #454 from TheThing/next
propify: Fix chaining to return original m.prop
This commit is contained in:
commit
550fe9871a
2 changed files with 9 additions and 1 deletions
|
|
@ -1836,6 +1836,13 @@ function testMithril(mock) {
|
|||
xhr.onreadystatechange()
|
||||
return xhr.$headers["Content-Type"] === undefined
|
||||
})
|
||||
test(function() {
|
||||
var prop = m.request({method: "POST", url: "test", initialValue: "foo"}).then(function(data) { return data; })
|
||||
var initialValue = prop();
|
||||
mock.XMLHttpRequest.$instances.pop().onreadystatechange()
|
||||
|
||||
return initialValue === "foo"
|
||||
})
|
||||
test(function() {
|
||||
var prop = m.request({method: "POST", url: "test", initialValue: "foo"})
|
||||
var initialValue = prop();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue