Skip to content

Commit

Permalink
test(transformer/class-properties): failing test for super.prop as …
Browse files Browse the repository at this point in the history
…assignment target
  • Loading branch information
overlookmotel committed Dec 18, 2024
1 parent 3ea4109 commit 59b7dbf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tasks/transform_conformance/snapshots/oxc.snap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit: 54a8389f

Passed: 114/129
Passed: 114/130

# All Passed:
* babel-plugin-transform-class-static-block
Expand All @@ -16,7 +16,10 @@ Passed: 114/129
* regexp


# babel-plugin-transform-class-properties (15/18)
# babel-plugin-transform-class-properties (15/19)
* static-super-assignment-target/input.js
x Output mismatch

* static-super-tagged-template/input.js
x Output mismatch

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
let bound = "A";

class Outer {
static prop = () => {
[super.prop] = [];
[super[bound]] = [];
[super[unbound]] = [];

[...super.prop] = [];
[...super[bound]] = [];
[...super[unbound]] = [];

({x: super.prop} = {});
({x: super[bound]} = {});
({x: super[unbound]} = {});

({...super.prop} = {});
({...super[bound]} = {});
({...super[unbound]} = {});
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// We don't know what correct output for this should be.
//
// Babel doesn't support this, but ESBuild does.
//
// We'd need to add a new helper function to support this.

class Outer {}

babelHelpers.defineProperty(Outer, "prop", () => {
// ?????
});

0 comments on commit 59b7dbf

Please sign in to comment.