-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/babel-plugin-transform-regenerator/test/fixtures/regression/4219/actual.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,5 @@ | ||
function test(fn) { | ||
return async (...args) => { | ||
return fn(...args); | ||
}; | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/babel-plugin-transform-regenerator/test/fixtures/regression/4219/expected.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 @@ | ||
"use strict"; | ||
|
||
function test(fn) { | ||
var _this = this; | ||
|
||
return function _callee() { | ||
var _args = arguments; | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
return _context.abrupt("return", fn.apply(undefined, _args)); | ||
|
||
case 1: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, null, _this); | ||
}; | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/babel-plugin-transform-regenerator/test/fixtures/regression/4219/options.json
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 @@ | ||
{ | ||
"plugins": [ | ||
"transform-es2015-parameters", | ||
"transform-es2015-spread", | ||
"transform-regenerator" | ||
] | ||
} |