#317 resolve w/ empty array if empty array

This commit is contained in:
Leo Horie 2014-10-31 21:50:19 -04:00
parent 19f5878592
commit cb296f6832
2 changed files with 13 additions and 6 deletions

View file

@ -1642,6 +1642,7 @@ function testMithril(mock) {
test(function() {
var prop = m.request({method: "GET", url: "test"})
mock.XMLHttpRequest.$instances.pop().onreadystatechange()
console.log(prop())
return prop().method === "GET" && prop().url === "test"
})
test(function() {
@ -1977,6 +1978,11 @@ function testMithril(mock) {
m.sync([]).then(function() {value = 2})
return value == 2
})
test(function() {
var success
m.sync([]).then(function(value) {success = value instanceof Array})
return success
})
//m.startComputation/m.endComputation
test(function() {