fix empty array case for Promise.all

This commit is contained in:
Leo Horie 2016-06-01 16:22:03 -04:00
parent 9a396c5173
commit c79b4545c2
2 changed files with 8 additions and 1 deletions

View file

@ -530,6 +530,12 @@ o.spec("promise", function() {
done()
})
})
o("resolves empty array", function(done) {
Promise.all([]).then(function(value) {
o(value).deepEquals([])
done()
})
})
o("resolves non-promise to itself", function(done) {
var a = new Promise(function(resolve, reject) {
callAsync(function() {resolve(1)})