| 521 | |
| 522 | it(class="st">"should not emit compilation errors in async (watch)", async () => { |
| 523 | const createStats = (/** @type {import(class="st">"../").Configuration} */ options) => |
| 524 | new Promise((resolve, reject) => { |
| 525 | const webpack = require(class="st">".."); |
| 526 | |
| 527 | const c = webpack(options); |
| 528 | c.outputFileSystem = /** @type {import(class="st">"../").OutputFileSystem} */ ( |
| 529 | /** @type {unknown} */ (createFsFromVolume(new Volume())) |
| 530 | ); |
| 531 | const watching = /** @type {import(class="st">"../").Watching} */ ( |
| 532 | c.watch({}, (err, stats) => { |
| 533 | /** @type {import(class="st">"../").Watching} */ (watching).close(() => { |
| 534 | if (err) return reject(err); |
| 535 | resolve(stats); |
| 536 | }); |
| 537 | }) |
| 538 | ); |
| 539 | }); |
| 540 | const stats = await createStats({ |
| 541 | context: __dirname, |
| 542 | mode: class="st">"production", |