Skip to content

Commit 6134260

Browse files
committed
fix: ensure runtime errors are always collected
As part of the remote environment refactoring & worker splitting-up, we removed the `collectRuntimeErrors` worker IPC setting as it was always hard-coded to `true`. The worker still relied on this setting and was not collecting runtime errors. This commit removes the remainings and ensures runtime error collection always happens.
1 parent 1d436bd commit 6134260

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

runner/workers/serve-testing/worker-types.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,20 @@ export interface ServeTestingWorkerMessage {
1515
serveUrl: string;
1616
/** Name of the app. */
1717
appName: string;
18-
/**
19-
* Whether this application should be invoked via Puppeteer and
20-
* runtime errors should be collected and reported.
21-
*/
22-
collectRuntimeErrors?: boolean;
2318
/**
2419
* Whether to take a screenshot of the application.
2520
*/
26-
takeScreenshots?: boolean;
21+
takeScreenshots: boolean;
2722
/**
2823
* Whether or not to perform Axe testing of the application.
2924
*/
30-
includeAxeTesting?: boolean;
25+
includeAxeTesting: boolean;
3126

3227
/** Whether to enable the auto CSP checks. */
33-
enableAutoCsp?: boolean;
28+
enableAutoCsp: boolean;
3429

3530
/** User journey browser agent task input */
36-
userJourneyAgentTaskInput?: BrowserAgentTaskInput;
31+
userJourneyAgentTaskInput: BrowserAgentTaskInput | undefined;
3732
}
3833

3934
export interface ServeTestingResult {

runner/workers/serve-testing/worker.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ process.on('message', async (message: ServeTestingWorkerMessage) => {
1515
const {
1616
appName,
1717
serveUrl,
18-
collectRuntimeErrors,
1918
enableAutoCsp,
2019
includeAxeTesting,
2120
takeScreenshots,
@@ -57,9 +56,8 @@ process.on('message', async (message: ServeTestingWorkerMessage) => {
5756
screenshotBase64Data = puppeteerResult.screenshotBase64Data;
5857
axeViolations = puppeteerResult.axeViolations;
5958
cspViolations = puppeteerResult.cspViolations;
60-
if (collectRuntimeErrors) {
61-
runtimeErrors.push(...puppeteerResult.runtimeErrors);
62-
}
59+
60+
runtimeErrors.push(...puppeteerResult.runtimeErrors);
6361

6462
if (userJourneyAgentTaskInput) {
6563
userJourneyAgentOutput = await runBrowserAgentUserJourneyTests(

0 commit comments

Comments
 (0)