(
/** @type {Record<string, unknown> | undefined} */ options = undefined
)
| 62 | }; |
| 63 | |
| 64 | const createSimpleCompilerWithCustomHandler = ( |
| 65 | /** @type {Record<string, unknown> | undefined} */ options = undefined |
| 66 | ) => { |
| 67 | const compiler = webpack({ |
| 68 | context: path.join(__dirname, "fixtures"), |
| 69 | entry: "./a.js" |
| 70 | }); |
| 71 | |
| 72 | compiler.outputFileSystem = /** @type {import("../").OutputFileSystem} */ ( |
| 73 | /** @type {unknown} */ (createFsFromVolume(new Volume())) |
| 74 | ); |
| 75 | const logger = compiler.getInfrastructureLogger("custom test logger"); |
| 76 | new webpack.ProgressPlugin({ |
| 77 | activeModules: true, |
| 78 | ...options, |
| 79 | handler: (...args) => logger.status(args) |
| 80 | }).apply(compiler); |
| 81 | |
| 82 | return compiler; |
| 83 | }; |
| 84 | |
| 85 | const getLogs = (/** @type {string} */ logsStr) => |
| 86 | logsStr.split(/\r/).filter((/** @type {string} */ v) => v !== " "); |
no test coverage detected