(
/** @type {(err: EXPECTED_ANY, stats?: EXPECTED_ANY) => void} */ callback
)
| 242 | } |
| 243 | |
| 244 | function runCompiler( |
| 245 | /** @type {(err: EXPECTED_ANY, stats?: EXPECTED_ANY) => void} */ callback |
| 246 | ) { |
| 247 | fakeUpdateLoaderOptions.updateIndex++; |
| 248 | const deprecationTracker = deprecationTracking.start(); |
| 249 | compiler.run((err, _stats) => { |
| 250 | const stats = /** @type {import("../").Stats} */ (_stats); |
| 251 | const deprecations = deprecationTracker(); |
| 252 | if (err) return callback(err); |
| 253 | const jsonStats = stats.toJson({ |
| 254 | errorDetails: true |
| 255 | }); |
| 256 | if ( |
| 257 | checkArrayExpectation( |
| 258 | testDirectory, |
| 259 | jsonStats, |
| 260 | "error", |
| 261 | `errors${fakeUpdateLoaderOptions.updateIndex}`, |
| 262 | "Error", |
| 263 | options, |
| 264 | callback |
| 265 | ) |
| 266 | ) { |
| 267 | return; |
| 268 | } |
| 269 | if ( |
| 270 | checkArrayExpectation( |
| 271 | testDirectory, |
| 272 | jsonStats, |
| 273 | "warning", |
| 274 | `warnings${fakeUpdateLoaderOptions.updateIndex}`, |
| 275 | "Warning", |
| 276 | options, |
| 277 | callback |
| 278 | ) |
| 279 | ) { |
| 280 | return; |
| 281 | } |
| 282 | if ( |
| 283 | checkArrayExpectation( |
| 284 | testDirectory, |
| 285 | { deprecations }, |
| 286 | "deprecation", |
| 287 | `deprecations${fakeUpdateLoaderOptions.updateIndex}`, |
| 288 | "Deprecation", |
| 289 | options, |
| 290 | callback |
| 291 | ) |
| 292 | ) { |
| 293 | return; |
| 294 | } |
| 295 | callback(null, jsonStats); |
| 296 | }); |
| 297 | } |
| 298 | |
| 299 | const _stats = stats.toJson({ all: false, entrypoints: true }); |
| 300 | const { results } = TestRunner.runBundles({ |
no test coverage detected