(compilation)
| 32 | * @returns {void} |
| 33 | */ |
| 34 | const handler = (compilation) => { |
| 35 | compilation.hooks.afterProcessAssets.tap("testcase", (assets) => { |
| 36 | for (const asset of Object.keys(assets)) { |
| 37 | const source = assets[asset].source(); |
| 38 | expect(source).not.toContain('"a"'); |
| 39 | expect(source).not.toContain('"b"'); |
| 40 | expect(source).not.toContain('"non-external"'); |
| 41 | // expect pure ESM export without webpack runtime |
| 42 | expect(source).not.toContain('"__webpack_exports__"'); |
| 43 | expect(source).not.toContain(".exports="); |
| 44 | } |
| 45 | }); |
| 46 | }; |
| 47 | this.hooks.compilation.tap("testcase", handler); |
| 48 | } |
| 49 | ] |
no test coverage detected