From 8d9ee69b0ab6cd1587080f67bb88672b89657bdf Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 16 Nov 2024 17:41:51 +0000 Subject: [PATCH] tests(transformer/async-to-generator): failing test for nested supers --- .../snapshots/oxc.snap.md | 8 +++++-- .../test/fixtures/super/nested/input.js | 15 +++++++++++++ .../test/fixtures/super/nested/output.js | 22 +++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/output.js diff --git a/tasks/transform_conformance/snapshots/oxc.snap.md b/tasks/transform_conformance/snapshots/oxc.snap.md index 9c5ea927d9b1be..872428d0eb015d 100644 --- a/tasks/transform_conformance/snapshots/oxc.snap.md +++ b/tasks/transform_conformance/snapshots/oxc.snap.md @@ -1,6 +1,6 @@ commit: d20b314c -Passed: 90/100 +Passed: 90/101 # All Passed: * babel-plugin-transform-class-static-block @@ -8,7 +8,6 @@ Passed: 90/100 * babel-plugin-transform-optional-catch-binding * babel-plugin-transform-async-generator-functions * babel-plugin-transform-object-rest-spread -* babel-plugin-transform-async-to-generator * babel-plugin-transform-exponentiation-operator * babel-plugin-transform-arrow-functions * babel-preset-typescript @@ -16,6 +15,11 @@ Passed: 90/100 * regexp +# babel-plugin-transform-async-to-generator (14/15) +* super/nested/input.js +x Output mismatch + + # babel-plugin-transform-typescript (2/9) * class-property-definition/input.ts Unresolved references mismatch: diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/input.js new file mode 100644 index 00000000000000..a1a511671b7b95 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/input.js @@ -0,0 +1,15 @@ +const outer = { + value: 0, + async method() { + () => super.value; + + const inner = { + value: 0, + async method() { + () => super.value; + } + }; + + () => super.value; + } +}; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/output.js new file mode 100644 index 00000000000000..16c7b41c9fa559 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/super/nested/output.js @@ -0,0 +1,22 @@ +const outer = { + value: 0, + method() { + var _superprop_getValue = () => super.value; + + return babelHelpers.asyncToGenerator(function* () { + () => _superprop_getValue(); + + const inner = { + value: 0, + method() { + var _superprop_getValue2 = () => super.value; + return babelHelpers.asyncToGenerator(function* () { + () => _superprop_getValue2(); + })(); + } + }; + + () => _superprop_getValue(); + })(); + } +};