Promise.any: simplify promise creation

This commit is contained in:
Rick Waldron 2020-03-25 09:42:35 -04:00
parent 5c68b60ad3
commit 7fbce5a9d8
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ features: [Promise.any, Symbol.iterator]
---*/
let error = new Test262Error();
let promise = new Promise(() => {});
let promise = Promise.resolve();
let returnCount = 0;
let iter = {
[Symbol.iterator]() {

View File

@ -19,7 +19,7 @@ flags: [async]
features: [Promise.any, Symbol.iterator]
---*/
let error = new Test262Error();
let promise = new Promise(() => {});
let promise = Promise.resolve();
let returnCount = 0;
let iter = {
[Symbol.iterator]() {

View File

@ -19,7 +19,7 @@ flags: [async]
features: [Promise.any]
---*/
let error = new Test262Error();
let promise = new Promise(() => {});
let promise = Promise.resolve();
Object.defineProperty(promise, 'then', {
get() {