-
-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6dc254
commit ba041f3
Showing
2 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
15 changes: 10 additions & 5 deletions
15
...bel-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
19 changes: 11 additions & 8 deletions
19
...el-plugin-transform-class-properties/test/fixtures/static-super-tagged-template/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |