* [preset-env] Don't use async-to-generator when already using regenerator * Add tests * Update fixtures
18 lines
409 B
JavaScript
18 lines
409 B
JavaScript
function test(fn) {
|
|
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(void 0, _args));
|
|
|
|
case 1:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
});
|
|
};
|
|
}
|