-
-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(transformer): more tests for arrow function transform (#5849)
- Loading branch information
1 parent
49ee1dc
commit ef8dcc9
Showing
5 changed files
with
49 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
commit: 3bcfee23 | ||
|
||
Passed: 44/54 | ||
Passed: 46/56 | ||
|
||
# All Passed: | ||
* babel-plugin-transform-nullish-coalescing-operator | ||
|
7 changes: 7 additions & 0 deletions
7
...ests/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/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,7 @@ | ||
let f; | ||
|
||
class C extends (f = () => this, class {}) {} | ||
|
||
function outer() { | ||
class C extends (f = () => this, class {}) {} | ||
} |
16 changes: 16 additions & 0 deletions
16
...sts/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-extends/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,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 {} | ||
) {} | ||
} |
11 changes: 11 additions & 0 deletions
11
...s/babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/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,11 @@ | ||
let f; | ||
|
||
class C { | ||
[f = () => this]() {} | ||
} | ||
|
||
function outer() { | ||
class C { | ||
[f = () => this]() {} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
.../babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-method-key/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,14 @@ | ||
var _this = this; | ||
|
||
let f; | ||
|
||
class C { | ||
[f = function() { return _this; }]() {} | ||
} | ||
|
||
function outer() { | ||
var _this2 = this; | ||
class C { | ||
[f = function() { return _this2; }]() {} | ||
} | ||
} |