lighthouse 11.1.0-dev.20230916 → 11.1.0-dev.20230918
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
/* eslint-disable no-console */
|
|
14
14
|
|
|
15
|
-
/** @typedef {import('./lib/child-process-error.js').ChildProcessError} ChildProcessError */
|
|
16
|
-
|
|
17
15
|
/**
|
|
18
16
|
* @typedef Run
|
|
19
17
|
* @property {string[] | undefined} networkRequests
|
|
@@ -39,6 +37,7 @@ import {runLighthouse as cliLighthouseRunner} from './lighthouse-runners/cli.js'
|
|
|
39
37
|
import {getAssertionReport} from './report-assert.js';
|
|
40
38
|
import {LocalConsole} from './lib/local-console.js';
|
|
41
39
|
import {ConcurrentMapper} from './lib/concurrent-mapper.js';
|
|
40
|
+
import {ChildProcessError} from './lib/child-process-error.js';
|
|
42
41
|
|
|
43
42
|
// The number of concurrent (`!runSerially`) tests to run if `jobs` isn't set.
|
|
44
43
|
const DEFAULT_CONCURRENT_RUNS = 5;
|
|
@@ -239,11 +238,18 @@ async function runSmokeTest(smokeTestDefn, testOptions) {
|
|
|
239
238
|
* @param {ChildProcessError|Error} err
|
|
240
239
|
*/
|
|
241
240
|
function logChildProcessError(localConsole, err) {
|
|
242
|
-
if (
|
|
241
|
+
if (err instanceof ChildProcessError) {
|
|
243
242
|
localConsole.adoptStdStrings(err);
|
|
244
243
|
}
|
|
245
244
|
|
|
246
245
|
localConsole.log(log.redify(err.stack || err.message));
|
|
246
|
+
if (err.cause) {
|
|
247
|
+
if (err.cause instanceof Error) {
|
|
248
|
+
localConsole.log(log.redify(`[cause] ${err.cause.stack || err.cause.message}`));
|
|
249
|
+
} else {
|
|
250
|
+
localConsole.log(log.redify(`[cause] ${err.cause}`));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
247
253
|
}
|
|
248
254
|
|
|
249
255
|
/**
|
package/package.json
CHANGED