-
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(transformer/class-properties): failing test for
super.prop
as …
…assignment target
- Loading branch information
1 parent
3ea4109
commit 59b7dbf
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
...l-plugin-transform-class-properties/test/fixtures/static-super-assignment-target/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 |
---|---|---|
@@ -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]} = {}); | ||
}; | ||
} |
11 changes: 11 additions & 0 deletions
11
...-plugin-transform-class-properties/test/fixtures/static-super-assignment-target/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 |
---|---|---|
@@ -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", () => { | ||
// ????? | ||
}); |