mirror of https://github.com/tc39/test262.git
Promise.any: empty iterable rejects with AggregateError
This commit is contained in:
parent
272e9abed4
commit
e0f0c7860b
|
@ -6,11 +6,15 @@ description: Promise.any([]) rejects immediately
|
|||
esid: sec-promise.any
|
||||
flags: [async]
|
||||
includes: [promiseHelper.js]
|
||||
features: [Promise.any]
|
||||
features: [AggregateError, Promise.any]
|
||||
---*/
|
||||
|
||||
Promise.any([])
|
||||
.then(
|
||||
() => $DONE('The promise should be rejected, but was resolved'),
|
||||
() => $DONE()
|
||||
error => {
|
||||
assert(error instanceof AggregateError);
|
||||
assert.sameValue(error.errors.length, 0);
|
||||
$DONE()
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue