diff --git a/tasks/transform_conformance/snapshots/oxc.snap.md b/tasks/transform_conformance/snapshots/oxc.snap.md index 19612c36acd99c..f99f561be09c59 100644 --- a/tasks/transform_conformance/snapshots/oxc.snap.md +++ b/tasks/transform_conformance/snapshots/oxc.snap.md @@ -1,6 +1,6 @@ commit: 54a8389f -Passed: 111/125 +Passed: 112/127 # All Passed: * babel-plugin-transform-class-static-block @@ -16,7 +16,10 @@ Passed: 111/125 * regexp -# babel-plugin-transform-class-properties (12/14) +# babel-plugin-transform-class-properties (13/16) +* static-super-tagged-template/input.js +x Output mismatch + * typescript/optional-call/input.ts Symbol reference IDs mismatch for "X": after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(6), ReferenceId(11), ReferenceId(16)] diff --git a/tasks/transform_conformance/snapshots/oxc_exec.snap.md b/tasks/transform_conformance/snapshots/oxc_exec.snap.md index 23e62427ba1c38..e20ce14fbc0242 100644 --- a/tasks/transform_conformance/snapshots/oxc_exec.snap.md +++ b/tasks/transform_conformance/snapshots/oxc_exec.snap.md @@ -2,4 +2,10 @@ commit: 54a8389f node: v22.12.0 -Passed: 3 of 3 (100.00%) +Passed: 3 of 4 (75.00%) + +Failures: + +./fixtures/oxc/babel-plugin-transform-class-properties-test-fixtures-static-super-tagged-template-exec.test.js +AssertionError: expected undefined to be [Function C] // Object.is equality + at ./tasks/transform_conformance/fixtures/oxc/babel-plugin-transform-class-properties-test-fixtures-static-super-tagged-template-exec.test.js:15:17 diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/exec.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/exec.js new file mode 100644 index 00000000000000..091975caf545ce --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/exec.js @@ -0,0 +1,13 @@ +import { expect } from "vitest"; + +class S { + static method() { + return this; + } +} + +class C extends S { + static prop = super.method`xyz`; +} + +expect(C.prop).toBe(C); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/input.js new file mode 100644 index 00000000000000..ae1a45a58e4b98 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/input.js @@ -0,0 +1,6 @@ +class Outer { + A = () => {}; + static B = () => { + super.A`oxc`; + }; +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/output.js new file mode 100644 index 00000000000000..a2248758e58e24 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/output.js @@ -0,0 +1,10 @@ +var _Outer; +class Outer { + constructor() { + babelHelpers.defineProperty(this, "A", () => {}); + } +} +_Outer = Outer; +babelHelpers.defineProperty(Outer, "B", () => { + babelHelpers.superPropGet(_Outer, "A", _Outer).bind(_Outer)`oxc`; +}); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged/input.js new file mode 100644 index 00000000000000..848e9b28ccb82b --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged/input.js @@ -0,0 +1,6 @@ +class Outer { + A = () => {}; + static B = () => { + super.A``; + }; +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged/output.js new file mode 100644 index 00000000000000..a6ca800241a17c --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged/output.js @@ -0,0 +1,10 @@ +var _Outer; +class Outer { + constructor() { + babelHelpers.defineProperty(this, "A", () => {}); + } +} +_Outer = Outer; +babelHelpers.defineProperty(Outer, "B", () => { + babelHelpers.superPropGet(_Outer, "A", _Outer)``; +}); \ No newline at end of file