Skip to content

Commit

Permalink
upgrade async await expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Sep 13, 2023
1 parent fde658a commit 9ebff18
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/expectations/es-next/async-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ define("es-next/async-await", ["exports"], function (_exports) {
value: true
});
_exports.default = void 0;
var _ref;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
let asyncFunc = /*#__PURE__*/function () {
var _ref = _asyncToGenerator(function* () {
let asyncFunc = function asyncFunc() {
return (_ref = _ref || _asyncToGenerator(function* () {
let result = yield Promise.resolve();
return Promise.resolve();
});
return function asyncFunc() {
return _ref.apply(this, arguments);
};
}();
})).apply(this, arguments);
};
function syncFunc() {
return Promise.all([asyncFunc()]);
}
Expand Down

0 comments on commit 9ebff18

Please sign in to comment.