increase test coverage
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "babel-plugin-transform-regenerator",
|
||||
"author": "Ben Newman <bn@cs.stanford.edu>",
|
||||
"description": "",
|
||||
"description": "Explode async and generator functions into a state machine.",
|
||||
"version": "6.0.18",
|
||||
"homepage": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-regenerator",
|
||||
"main": "lib/index.js",
|
||||
|
||||
@@ -37,13 +37,7 @@ exports.visitor = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.expression) {
|
||||
// Transform expression lambdas into normal functions.
|
||||
node.expression = false;
|
||||
node.body = t.blockStatement([
|
||||
t.returnStatement(node.body)
|
||||
]);
|
||||
}
|
||||
path.ensureBlock();
|
||||
|
||||
if (node.async) {
|
||||
path.get("body").traverse(awaitVisitor);
|
||||
|
||||
Reference in New Issue
Block a user