From ba041f32ca0ca724fdbd5dc02fa9a0b5c7991d08 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Wed, 18 Dec 2024 10:13:30 +0000 Subject: [PATCH] output test copy exec test --- .../static-super-tagged-template/input.js | 15 ++++++++++----- .../static-super-tagged-template/output.js | 19 +++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) 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 index ae1a45a58e4b98..9b3ff167106aae 100644 --- 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 @@ -1,6 +1,11 @@ -class Outer { - A = () => {}; - static B = () => { - super.A`oxc`; - }; +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/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/output.js index a2248758e58e24..0f64a58ada976a 100644 --- 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 @@ -1,10 +1,13 @@ -var _Outer; -class Outer { - constructor() { - babelHelpers.defineProperty(this, "A", () => {}); +var _C; + +class S { + static method() { + return this; } } -_Outer = Outer; -babelHelpers.defineProperty(Outer, "B", () => { - babelHelpers.superPropGet(_Outer, "A", _Outer).bind(_Outer)`oxc`; -}); + +class C extends S {} +_C = C; +babelHelpers.defineProperty(C, "prop", babelHelpers.superPropGet(_C, "method", _C).bind(_C)`xyz`); + +expect(C.prop).toBe(C);