Skip to content

Commit 68dd8c7

Browse files
igorcostaAutohand Evolve
andcommitted
fix: throw error with stderr content for CI debugging
Changed the test to throw an error with the stderr content when the host script exits with a non-zero code. This will make the actual error message visible in the CI test output. Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
1 parent 0995282 commit 68dd8c7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/browser/chrome.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ describe('browser/chrome', () => {
226226
child.stdin.end();
227227

228228
const exitResult = await exitPromise;
229+
230+
if (exitResult.code !== 0) {
231+
const stderr = Buffer.concat(stderrChunks).toString('utf8');
232+
throw new Error(`Host script exited with code ${exitResult.code}. Stderr: ${stderr || '(empty)'}`);
233+
}
229234

230235
expect(exitResult.code).toBe(0);
231236
expect(exitResult.signal).toBeNull();

0 commit comments

Comments
 (0)