From 4fe158d39d6c8e372d8ad3e4661d995dbaf94fd9 Mon Sep 17 00:00:00 2001 From: Cam Tenny Date: Thu, 29 Dec 2022 17:09:13 -0800 Subject: [PATCH] Generated tests for refactoring (IIFE/async function).then(\$DONE, \$DONE); to use asyncTest --- .../named-reassign-fn-name-in-body-in-arrow.js | 5 +++-- .../async-function/named-reassign-fn-name-in-body-in-eval.js | 5 +++-- .../async-function/named-reassign-fn-name-in-body.js | 5 +++-- .../named-strict-error-reassign-fn-name-in-body-in-arrow.js | 5 +++-- .../named-strict-error-reassign-fn-name-in-body-in-eval.js | 5 +++-- .../named-strict-error-reassign-fn-name-in-body.js | 5 +++-- .../named-no-strict-reassign-fn-name-in-body-in-arrow.js | 5 +++-- .../named-no-strict-reassign-fn-name-in-body-in-eval.js | 5 +++-- .../named-no-strict-reassign-fn-name-in-body.js | 5 +++-- .../named-strict-error-reassign-fn-name-in-body-in-arrow.js | 5 +++-- .../named-strict-error-reassign-fn-name-in-body-in-eval.js | 5 +++-- .../named-strict-error-reassign-fn-name-in-body.js | 5 +++-- 12 files changed, 36 insertions(+), 24 deletions(-) diff --git a/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-arrow.js b/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-arrow.js index e9b28d563d..747de4c650 100644 --- a/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-arrow.js +++ b/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-arrow.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-async-function-definitions features: [async-functions] flags: [generated, async, noStrict] +includes: [asyncHelpers.js] info: | Async Function Definitions @@ -24,8 +25,8 @@ let ref = async function BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { assert.sameValue(await ref(), ref); assert.sameValue(callCount, 1, 'function invoked exactly once'); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-eval.js b/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-eval.js index 3fe24af3a3..7c81e138b4 100644 --- a/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-eval.js +++ b/test/language/expressions/async-function/named-reassign-fn-name-in-body-in-eval.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-async-function-definitions features: [async-functions] flags: [generated, async, noStrict] +includes: [asyncHelpers.js] info: | Async Function Definitions @@ -22,8 +23,8 @@ let ref = async function BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { assert.sameValue(await ref(), ref); assert.sameValue(callCount, 1, 'function invoked exactly once'); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-function/named-reassign-fn-name-in-body.js b/test/language/expressions/async-function/named-reassign-fn-name-in-body.js index 706da61679..bf10d14951 100644 --- a/test/language/expressions/async-function/named-reassign-fn-name-in-body.js +++ b/test/language/expressions/async-function/named-reassign-fn-name-in-body.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-async-function-definitions features: [async-functions] flags: [generated, async, noStrict] +includes: [asyncHelpers.js] info: | Async Function Definitions @@ -22,8 +23,8 @@ let ref = async function BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { assert.sameValue(await ref(), ref); assert.sameValue(callCount, 1, 'function invoked exactly once'); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-arrow.js b/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-arrow.js index fed64b3cd4..55df16392a 100644 --- a/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-arrow.js +++ b/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-arrow.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-async-function-definitions features: [async-functions] flags: [generated, async, onlyStrict] +includes: [asyncHelpers.js] info: | Async Function Definitions @@ -24,7 +25,7 @@ let ref = async function BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { let catchCount = 0; try { await ref() @@ -34,5 +35,5 @@ let ref = async function BindingIdentifier() { } assert.sameValue(catchCount, 1); assert.sameValue(callCount, 1); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-eval.js b/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-eval.js index 9b00d60f60..aeac2f2f3d 100644 --- a/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-eval.js +++ b/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body-in-eval.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-async-function-definitions features: [async-functions] flags: [generated, async, onlyStrict] +includes: [asyncHelpers.js] info: | Async Function Definitions @@ -22,7 +23,7 @@ let ref = async function BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { let catchCount = 0; try { await ref() @@ -32,5 +33,5 @@ let ref = async function BindingIdentifier() { } assert.sameValue(catchCount, 1); assert.sameValue(callCount, 1); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body.js b/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body.js index 8c07fc967b..9c8c008d3b 100644 --- a/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body.js +++ b/test/language/expressions/async-function/named-strict-error-reassign-fn-name-in-body.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-async-function-definitions features: [async-functions] flags: [generated, async, onlyStrict] +includes: [asyncHelpers.js] info: | Async Function Definitions @@ -22,7 +23,7 @@ let ref = async function BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { let catchCount = 0; try { await ref() @@ -32,5 +33,5 @@ let ref = async function BindingIdentifier() { } assert.sameValue(catchCount, 1); assert.sameValue(callCount, 1); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-arrow.js b/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-arrow.js index 3a3e19057b..595b7afcfb 100644 --- a/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-arrow.js +++ b/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-arrow.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-asyncgenerator-definitions-evaluation features: [async-iteration] flags: [generated, async, noStrict] +includes: [asyncHelpers.js] info: | AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } @@ -22,8 +23,8 @@ let ref = async function * BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { assert.sameValue((await (await ref()).next()).value, ref); assert.sameValue(callCount, 1, 'function invoked exactly once'); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-eval.js b/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-eval.js index 1f0dcb1a07..e7a3f4b99b 100644 --- a/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-eval.js +++ b/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body-in-eval.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-asyncgenerator-definitions-evaluation features: [async-iteration] flags: [generated, async, noStrict] +includes: [asyncHelpers.js] info: | AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } @@ -20,8 +21,8 @@ let ref = async function * BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { assert.sameValue((await (await ref()).next()).value, ref); assert.sameValue(callCount, 1, 'function invoked exactly once'); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body.js b/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body.js index a56ecd7f24..9a98feddd9 100644 --- a/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body.js +++ b/test/language/expressions/async-generator/named-no-strict-reassign-fn-name-in-body.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-asyncgenerator-definitions-evaluation features: [async-iteration] flags: [generated, async, noStrict] +includes: [asyncHelpers.js] info: | AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } @@ -20,8 +21,8 @@ let ref = async function * BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { assert.sameValue((await (await ref()).next()).value, ref); assert.sameValue(callCount, 1, 'function invoked exactly once'); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-arrow.js b/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-arrow.js index 57164314f3..4313def63f 100644 --- a/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-arrow.js +++ b/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-arrow.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-asyncgenerator-definitions-evaluation features: [async-iteration] flags: [generated, async, onlyStrict] +includes: [asyncHelpers.js] info: | AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } @@ -22,7 +23,7 @@ let ref = async function * BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { let catchCount = 0; try { (await (await ref()).next()).value @@ -32,5 +33,5 @@ let ref = async function * BindingIdentifier() { } assert.sameValue(catchCount, 1); assert.sameValue(callCount, 1); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-eval.js b/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-eval.js index f158484f23..6e5fb79abd 100644 --- a/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-eval.js +++ b/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body-in-eval.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-asyncgenerator-definitions-evaluation features: [async-iteration] flags: [generated, async, onlyStrict] +includes: [asyncHelpers.js] info: | AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } @@ -20,7 +21,7 @@ let ref = async function * BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { let catchCount = 0; try { (await (await ref()).next()).value @@ -30,5 +31,5 @@ let ref = async function * BindingIdentifier() { } assert.sameValue(catchCount, 1); assert.sameValue(callCount, 1); -})().then($DONE, $DONE); +}); diff --git a/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body.js b/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body.js index 9b6109e74c..aec8eabc82 100644 --- a/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body.js +++ b/test/language/expressions/async-generator/named-strict-error-reassign-fn-name-in-body.js @@ -6,6 +6,7 @@ description: Reassignment of function name is silently ignored in non-strict mod esid: sec-asyncgenerator-definitions-evaluation features: [async-iteration] flags: [generated, async, onlyStrict] +includes: [asyncHelpers.js] info: | AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody } @@ -20,7 +21,7 @@ let ref = async function * BindingIdentifier() { return BindingIdentifier; }; -(async () => { +asyncTest(async () => { let catchCount = 0; try { (await (await ref()).next()).value @@ -30,5 +31,5 @@ let ref = async function * BindingIdentifier() { } assert.sameValue(catchCount, 1); assert.sameValue(callCount, 1); -})().then($DONE, $DONE); +});