From 7fbce5a9d8ebd7c513fb98e9f4bccf62aa64daf4 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Wed, 25 Mar 2020 09:42:35 -0400 Subject: [PATCH] Promise.any: simplify promise creation --- test/built-ins/Promise/any/invoke-then-error-close.js | 2 +- test/built-ins/Promise/any/invoke-then-get-error-close.js | 2 +- test/built-ins/Promise/any/invoke-then-get-error-reject.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/built-ins/Promise/any/invoke-then-error-close.js b/test/built-ins/Promise/any/invoke-then-error-close.js index fa1389950c..0685a13758 100644 --- a/test/built-ins/Promise/any/invoke-then-error-close.js +++ b/test/built-ins/Promise/any/invoke-then-error-close.js @@ -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]() { diff --git a/test/built-ins/Promise/any/invoke-then-get-error-close.js b/test/built-ins/Promise/any/invoke-then-get-error-close.js index 603edf4e1c..29088a8f28 100644 --- a/test/built-ins/Promise/any/invoke-then-get-error-close.js +++ b/test/built-ins/Promise/any/invoke-then-get-error-close.js @@ -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]() { diff --git a/test/built-ins/Promise/any/invoke-then-get-error-reject.js b/test/built-ins/Promise/any/invoke-then-get-error-reject.js index 1651cb1aac..24a312d34b 100644 --- a/test/built-ins/Promise/any/invoke-then-get-error-reject.js +++ b/test/built-ins/Promise/any/invoke-then-get-error-reject.js @@ -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() {