Add test for T3026.
This commit is contained in:
parent
f98dd6c76d
commit
7621d38bbd
@ -0,0 +1,3 @@
|
||||
import bar from 'bar';
|
||||
|
||||
export async function foo () { }
|
||||
@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.foo = undefined;
|
||||
|
||||
var _bar = require('bar');
|
||||
|
||||
var _bar2 = babelHelpers.interopRequireDefault(_bar);
|
||||
|
||||
let foo = exports.foo = function () {
|
||||
var ref = babelHelpers.asyncToGenerator(function* () {});
|
||||
return function foo() {
|
||||
return ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
@ -0,0 +1 @@
|
||||
export async function foo () { }
|
||||
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
let foo = exports.foo = function () {
|
||||
var ref = babelHelpers.asyncToGenerator(function* () {});
|
||||
return function foo() {
|
||||
return ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
3
packages/babel-plugin-transform-async-to-generator/test/fixtures/export-async/options.json
vendored
Normal file
3
packages/babel-plugin-transform-async-to-generator/test/fixtures/export-async/options.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers", "transform-es2015-modules-commonjs", "transform-async-to-generator"]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user