From 9b60f5f061db958528bab9d0de5dc3e27ad8143b Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Thu, 9 Jan 2025 12:30:32 +0000 Subject: [PATCH] test(transformer/async-to-generator): failing test for async arrow function in class static block --- tasks/transform_conformance/snapshots/oxc.snap.md | 8 ++++++-- .../test/fixtures/class/static-block/input.js | 5 +++++ .../test/fixtures/class/static-block/output.js | 8 ++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/input.js create mode 100644 tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/output.js diff --git a/tasks/transform_conformance/snapshots/oxc.snap.md b/tasks/transform_conformance/snapshots/oxc.snap.md index 44675a8c63426..ff954e232fadd 100644 --- a/tasks/transform_conformance/snapshots/oxc.snap.md +++ b/tasks/transform_conformance/snapshots/oxc.snap.md @@ -1,6 +1,6 @@ commit: 54a8389f -Passed: 126/147 +Passed: 126/148 # All Passed: * babel-plugin-transform-class-static-block @@ -10,7 +10,6 @@ Passed: 126/147 * 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 @@ -47,6 +46,11 @@ after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(6), R rebuilt : SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(6), ReferenceId(10)] +# babel-plugin-transform-async-to-generator (20/21) +* class/static-block/input.js +x Output mismatch + + # babel-plugin-transform-typescript (2/13) * class-property-definition/input.ts Unresolved references mismatch: diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/input.js new file mode 100644 index 0000000000000..2f3402957f874 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/input.js @@ -0,0 +1,5 @@ +class C extends S { + static { + this.fn = async () => super.foo; + } +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/output.js new file mode 100644 index 0000000000000..4092b9b3b5015 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-async-to-generator/test/fixtures/class/static-block/output.js @@ -0,0 +1,8 @@ +class C extends S { + static { + var _superprop_getFoo = () => super.foo; + this.fn = babelHelpers.asyncToGenerator(function* () { + return _superprop_getFoo(); + }); + } +}