diff --git a/tasks/transform_conformance/oxc.snap.md b/tasks/transform_conformance/oxc.snap.md index afe94fbacf4ee..373fd2467ec1a 100644 --- a/tasks/transform_conformance/oxc.snap.md +++ b/tasks/transform_conformance/oxc.snap.md @@ -1,6 +1,6 @@ commit: 3bcfee23 -Passed: 44/54 +Passed: 46/56 # All Passed: * babel-plugin-transform-nullish-coalescing-operator diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/input.js new file mode 100644 index 0000000000000..eed0e6c855030 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/input.js @@ -0,0 +1,7 @@ +let f; + +class C extends (f = () => this, class {}) {} + +function outer() { + class C extends (f = () => this, class {}) {} +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/output.js new file mode 100644 index 0000000000000..3305b2b087b52 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/output.js @@ -0,0 +1,16 @@ +var _this = this; + +let f; + +class C extends ( + f = function() { return _this; }, + class {} +) {} + +function outer() { + var _this2 = this; + class C extends ( + f = function() { return _this2; }, + class {} + ) {} +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/input.js new file mode 100644 index 0000000000000..2355b444c8cd8 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/input.js @@ -0,0 +1,11 @@ +let f; + +class C { + [f = () => this]() {} +} + +function outer() { + class C { + [f = () => this]() {} + } +} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/output.js new file mode 100644 index 0000000000000..1a4f241cc3694 --- /dev/null +++ b/tasks/transform_conformance/tests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/output.js @@ -0,0 +1,14 @@ +var _this = this; + +let f; + +class C { + [f = function() { return _this; }]() {} +} + +function outer() { + var _this2 = this; + class C { + [f = function() { return _this2; }]() {} + } +}