rewrite named function expressions in async function transformers - fixes #979
This commit is contained in:
5
test/fixtures/transformation/async-to-generator/named-expression/actual.js
vendored
Normal file
5
test/fixtures/transformation/async-to-generator/named-expression/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var foo = async function bar() {
|
||||
console.log(bar);
|
||||
};
|
||||
|
||||
foo();
|
||||
9
test/fixtures/transformation/async-to-generator/named-expression/expected.js
vendored
Normal file
9
test/fixtures/transformation/async-to-generator/named-expression/expected.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var _bar;
|
||||
|
||||
var foo = _bar = babelHelpers.asyncToGenerator(function* () {
|
||||
console.log(_bar);
|
||||
});
|
||||
|
||||
foo();
|
||||
5
test/fixtures/transformation/bluebird-coroutines/named-expression/actual.js
vendored
Normal file
5
test/fixtures/transformation/bluebird-coroutines/named-expression/actual.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var foo = async function bar() {
|
||||
console.log(bar);
|
||||
};
|
||||
|
||||
foo();
|
||||
11
test/fixtures/transformation/bluebird-coroutines/named-expression/expected.js
vendored
Normal file
11
test/fixtures/transformation/bluebird-coroutines/named-expression/expected.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
var _bluebird = require("bluebird");
|
||||
|
||||
var _bar;
|
||||
|
||||
var foo = _bar = _bluebird.coroutine(function* () {
|
||||
console.log(_bar);
|
||||
});
|
||||
|
||||
foo();
|
||||
Reference in New Issue
Block a user