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 error = new Test262Error();
let promise = new Promise(() => {}); let promise = Promise.resolve();
let returnCount = 0; let returnCount = 0;
let iter = { let iter = {
[Symbol.iterator]() { [Symbol.iterator]() {

View File

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

View File

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