fix empty array case for Promise.all
This commit is contained in:
parent
9a396c5173
commit
c79b4545c2
2 changed files with 8 additions and 1 deletions
|
|
@ -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)})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue