Skip to content

Commit

Permalink
update expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Oct 24, 2023
1 parent ff900b0 commit 1abc2bc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
15 changes: 8 additions & 7 deletions test/expectations/es-next/async-await.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ 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 = function asyncFunc() {
return (_ref = _ref || _asyncToGenerator(function* () {
let asyncFunc = /*#__PURE__*/function () {
var _ref = _asyncToGenerator(function* () {
let result = yield Promise.resolve();
return Promise.resolve();
})).apply(this, arguments);
};
});
return function asyncFunc() {
return _ref.apply(this, arguments);
};
}();
function syncFunc() {
return Promise.all([asyncFunc()]);
}
var _default = syncFunc;
_exports.default = _default;
var _default = _exports.default = syncFunc;
});
7 changes: 3 additions & 4 deletions test/expectations/es-next/dynamic-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ define("es-next/dynamic-import", ["require", "exports"], function (_require, _ex
value: true
});
_exports.default = void 0;
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
let x = './dir';
let y = new Promise((_resolve, _reject) => {
try {
Expand All @@ -15,6 +15,5 @@ define("es-next/dynamic-import", ["require", "exports"], function (_require, _ex
_reject();
}
});
var _default = y;
_exports.default = _default;
var _default = _exports.default = y;
});
7 changes: 3 additions & 4 deletions test/expectations/es-next/dynamic-string-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ define("es-next/dynamic-string-import", ["require", "exports"], function (_requi
value: true
});
_exports.default = void 0;
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
let x = './dir';
let y = new Promise((_resolve, _reject) => {
try {
Expand All @@ -15,6 +15,5 @@ define("es-next/dynamic-string-import", ["require", "exports"], function (_requi
_reject();
}
});
var _default = y;
_exports.default = _default;
var _default = _exports.default = y;
});
3 changes: 1 addition & 2 deletions test/expectations/es-next/import-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ define("es-next/import-export", ["exports", "y"], function (_exports, _y) {
_exports.default = void 0;
_y = _interopRequireDefault(_y);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = _y.default;
_exports.default = _default;
var _default = _exports.default = _y.default;
});
3 changes: 1 addition & 2 deletions test/expectations/es-next/module-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ define("es-next/module-root", ["exports", "import-export"], function (_exports,
_exports.default = void 0;
_importExport = _interopRequireDefault(_importExport);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = _importExport.default;
_exports.default = _default;
var _default = _exports.default = _importExport.default;
});

0 comments on commit 1abc2bc

Please sign in to comment.