mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 21:45:04 +02:00
Promise.any: make async operation test actually async
This commit is contained in:
parent
47b3858978
commit
272e9abed4
@ -15,6 +15,7 @@ info: |
|
|||||||
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
|
i. Let nextPromise be ? Call(promiseResolve, constructor, « nextValue »).
|
||||||
...
|
...
|
||||||
z. Perform ? Invoke(nextPromise, "then", « resolveElement, rejectElement »).
|
z. Perform ? Invoke(nextPromise, "then", « resolveElement, rejectElement »).
|
||||||
|
flags: [async]
|
||||||
features: [Promise.any]
|
features: [Promise.any]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
@ -45,8 +46,10 @@ Promise.resolve = function(nextValue) {
|
|||||||
return resolve.apply(Promise, arguments);
|
return resolve.apply(Promise, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
Promise.any([p1, p2, p3]);
|
Promise.any([p1, p2, p3])
|
||||||
|
.then(function() {
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
callCount, 3, '`resolve` invoked once for each iterated value'
|
callCount, 3, '`resolve` invoked once for each iterated value'
|
||||||
);
|
);
|
||||||
|
$DONE();
|
||||||
|
}, $DONE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user