Skip to content

Commit

Permalink
test(transformer/class-properties): override test output for _super
Browse files Browse the repository at this point in the history
… in class constructor (#7726)

Our output for this test differs from Babel, because we handle `super()` in class constructors differently, but our output is valid.
  • Loading branch information
overlookmotel committed Dec 8, 2024
1 parent 48b1e4a commit 3bae741
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var _bar = /*#__PURE__*/new WeakMap();
class Foo extends Bar {
constructor() {
var _super = (..._args) => (
super(..._args),
babelHelpers.classPrivateFieldInitSpec(this, _bar, "foo"),
this
);
foo(_super());
}
}
7 changes: 2 additions & 5 deletions tasks/transform_conformance/snapshots/babel.snap.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
commit: 54a8389f

Passed: 439/846
Passed: 440/846

# All Passed:
* babel-plugin-transform-class-static-block
Expand Down Expand Up @@ -276,7 +276,7 @@ x Output mismatch
x Output mismatch


# babel-plugin-transform-class-properties (112/264)
# babel-plugin-transform-class-properties (113/264)
* assumption-constantSuper/complex-super-class/input.js
x Output mismatch

Expand Down Expand Up @@ -591,9 +591,6 @@ Scope parent mismatch:
after transform: ScopeId(2): Some(ScopeId(1))
rebuilt : ScopeId(2): Some(ScopeId(0))

* private/super-expression/input.js
x Output mismatch

* private-loose/assignment/input.js
x Output mismatch

Expand Down

0 comments on commit 3bae741

Please sign in to comment.