allow resolving w/ no value
This commit is contained in:
parent
67c5400d44
commit
46565f2e03
3 changed files with 27 additions and 6 deletions
|
|
@ -742,6 +742,24 @@ function testMithril(mock) {
|
|||
deferred.reject(2)
|
||||
return value === 1
|
||||
})
|
||||
test(function() {
|
||||
//https://github.com/lhorie/mithril.js/issues/85
|
||||
var deferred = m.deferred(), value
|
||||
deferred.resolve()
|
||||
deferred.promise.then(function(data) {
|
||||
value = 1
|
||||
})
|
||||
return value === 1
|
||||
})
|
||||
test(function() {
|
||||
//https://github.com/lhorie/mithril.js/issues/85
|
||||
var deferred = m.deferred(), value
|
||||
deferred.reject()
|
||||
deferred.promise.then(null, function(data) {
|
||||
value = 1
|
||||
})
|
||||
return value === 1
|
||||
})
|
||||
|
||||
//m.sync
|
||||
test(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue