Add test for 2892

This commit is contained in:
Henry Zhu
2016-01-14 13:56:13 -05:00
parent 3f2a445c9a
commit 10105bb077
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
export default class Foo {
async bar() {
const baz = 0;
}
}

View File

@@ -0,0 +1,19 @@
export default class Foo {
bar() {
var _this = this;
return babelHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() {
var baz;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
baz = 0;
case 1:
case "end":
return _context.stop();
}
}, _callee, _this);
}))();
}
}

View File

@@ -0,0 +1,3 @@
{
"plugins": ["external-helpers", "transform-async-to-generator", "transform-regenerator"]
}