-
-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(transformer): add test for arrow function transform
- Loading branch information
1 parent
e148c80
commit 9f77ef2
Showing
3 changed files
with
33 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: 48/57 | ||
Passed: 49/58 | ||
|
||
# All Passed: | ||
* babel-plugin-transform-nullish-coalescing-operator | ||
|
15 changes: 15 additions & 0 deletions
15
...l-plugin-transform-arrow-functions/test/fixtures/use-this-inside-blocks-in-arrow/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,15 @@ | ||
function outer() { | ||
let f = () => { | ||
{ | ||
let t = this; | ||
} | ||
}; | ||
|
||
let f2 = () => { | ||
if (x) { | ||
if (y) { | ||
return this; | ||
} | ||
} | ||
}; | ||
} |
17 changes: 17 additions & 0 deletions
17
...-plugin-transform-arrow-functions/test/fixtures/use-this-inside-blocks-in-arrow/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,17 @@ | ||
function outer() { | ||
var _this = this; | ||
|
||
let f = function() { | ||
{ | ||
let t = _this; | ||
} | ||
}; | ||
|
||
let f2 = function() { | ||
if (x) { | ||
if (y) { | ||
return _this; | ||
} | ||
} | ||
}; | ||
} |