mirror of https://github.com/tc39/test262.git
Promise.any: convert sync test to async test to ensure run to completion
This commit is contained in:
parent
860e02ad28
commit
e0abeaa4df
|
@ -14,6 +14,8 @@ info: |
|
||||||
Runtime Semantics: PerformPromiseAny
|
Runtime Semantics: PerformPromiseAny
|
||||||
|
|
||||||
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
|
r. Perform ? Invoke(nextPromise, "then", « resultCapability.[[Resolve]], rejectElement »).
|
||||||
|
|
||||||
|
flags: [async]
|
||||||
features: [Promise.any]
|
features: [Promise.any]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
@ -48,6 +50,8 @@ p1.then = p2.then = p3.then = function(a, b) {
|
||||||
callCount += 1;
|
callCount += 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
Promise.any([p1, p2, p3]);
|
Promise.any([p1, p2, p3])
|
||||||
|
.then(function() {
|
||||||
assert.sameValue(callCount, 3, '`then` invoked once for every iterated value');
|
assert.sameValue(callCount, 3, '`then` invoked once for every iterated value');
|
||||||
|
$DONE();
|
||||||
|
}, $DONE);
|
||||||
|
|
Loading…
Reference in New Issue