|
| 1 | +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing |
| 2 | + |
| 3 | +exports[`ConfigTestCases concatenate-modules commonjs-wrapped-external-new-expression commonjs-wrapped-external-new-expression should compile 1`] = ` |
| 4 | +"/******/ (() => { // webpackBootstrap |
| 5 | +/******/ \\"use strict\\"; |
| 6 | +/******/ // The require scope |
| 7 | +/******/ const __webpack_require__ = {}; |
| 8 | +/******/ |
| 9 | +/************************************************************************/ |
| 10 | +/******/ /* webpack/runtime/concatenation wrap */ |
| 11 | +/******/ // wrap a concatenated module body as a lazy, memoized accessor; mod is |
| 12 | +/******/ // set before the body runs so re-entrant calls (require cycles) observe |
| 13 | +/******/ // the partial exports like Node.js |
| 14 | +/******/ __webpack_require__.cw = (body) => { |
| 15 | +/******/ var mod; |
| 16 | +/******/ return () => { |
| 17 | +/******/ if (body) { |
| 18 | +/******/ var fn = body; |
| 19 | +/******/ body = 0; |
| 20 | +/******/ mod = { exports: {} }; |
| 21 | +/******/ fn.call(mod.exports, mod, mod.exports); |
| 22 | +/******/ } |
| 23 | +/******/ return mod.exports; |
| 24 | +/******/ }; |
| 25 | +/******/ }; |
| 26 | +/******/ |
| 27 | +/******/ /* webpack/runtime/define property getters */ |
| 28 | +/******/ // define getter/value functions for harmony exports |
| 29 | +/******/ __webpack_require__.d = (exports, definition) => { |
| 30 | +/******/ if(Array.isArray(definition)) { |
| 31 | +/******/ var i = 0; |
| 32 | +/******/ while(i < definition.length) { |
| 33 | +/******/ var key = definition[i++]; |
| 34 | +/******/ var binding = definition[i++]; |
| 35 | +/******/ var descriptor = binding === 0 ? { enumerable: true, value: definition[i++] } : { enumerable: true, get: binding }; |
| 36 | +/******/ if(!__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, descriptor); |
| 37 | +/******/ } |
| 38 | +/******/ } else { |
| 39 | +/******/ for(var key in definition) { |
| 40 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
| 41 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
| 42 | +/******/ } |
| 43 | +/******/ } |
| 44 | +/******/ } |
| 45 | +/******/ }; |
| 46 | +/******/ |
| 47 | +/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
| 48 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)); |
| 49 | +/******/ |
| 50 | +/************************************************************************/ |
| 51 | +/*!******************************!*\\\\ |
| 52 | + !*** ./index.js + 3 modules ***! |
| 53 | + \\\\******************************/ |
| 54 | +
|
| 55 | +// MODULE: external \\"events\\" |
| 56 | +var external_events_namespaceFn = /*#__PURE__*/__webpack_require__.cw(function(module, exports) { |
| 57 | +module.exports = require(\\"events\\"); |
| 58 | +}); |
| 59 | +
|
| 60 | +// MODULE: ./mid.cjs |
| 61 | +var mid_namespaceFn = /*#__PURE__*/__webpack_require__.cw(function(module, exports) { |
| 62 | +
|
| 63 | +
|
| 64 | +const { make, raw } = (esm_user_namespaceFn()); |
| 65 | +
|
| 66 | +exports.L = make; |
| 67 | +exports.l = raw; |
| 68 | +
|
| 69 | +}); |
| 70 | +
|
| 71 | +// MODULE: ./esm-user.mjs |
| 72 | +var esm_user_namespaceFn = /*#__PURE__*/__webpack_require__.cw(function(__webpack_module__, __webpack_exports__) { |
| 73 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { |
| 74 | +/* harmony export */ make: () => (/* binding */ make) |
| 75 | +/* harmony export */ }); |
| 76 | +(external_events_namespaceFn()); |
| 77 | +// required by a CommonJS module, so wrapping propagates from here to the |
| 78 | +// external: the default import becomes the external's accessor call |
| 79 | +
|
| 80 | +
|
| 81 | +function make() { |
| 82 | + return new (external_events_namespaceFn())(); |
| 83 | +} |
| 84 | +
|
| 85 | +const raw = (external_events_namespaceFn()); |
| 86 | +
|
| 87 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, [ |
| 88 | +/* harmony export */ \\"raw\\", 0, /* binding */ raw |
| 89 | +/* harmony export */ ]); |
| 90 | +
|
| 91 | +}); |
| 92 | +
|
| 93 | +;// ./mid.cjs |
| 94 | +mid_namespaceFn(); |
| 95 | +
|
| 96 | +;// ./index.js |
| 97 | +
|
| 98 | +
|
| 99 | +it(\\"should apply \`new\` to a wrapped external's accessor result\\", () => { |
| 100 | + const emitter = (0,mid_namespaceFn().L)(); |
| 101 | +
|
| 102 | + expect(emitter).toBeInstanceOf((mid_namespaceFn().l)); |
| 103 | + expect(typeof emitter.on).toBe(\\"function\\"); |
| 104 | +}); |
| 105 | +
|
| 106 | +/******/ })() |
| 107 | +;" |
| 108 | +`; |
0 commit comments