Skip to content

Commit 24e3290

Browse files
committed
refactor: improve debug message for test runner uncaught exceptions
This should make debugging easier. It wasn't very easy to figure out where the errors originated from (because of how the actual uncaught exception only happened with many concurrent builds inside a sandbox environment that is hard to debug)
1 parent 79b0ba4 commit 24e3290

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changeset/shaggy-chefs-dance.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@web/test-runner-core': patch
3+
---
4+
5+
Improve debug message for test runner uncaught exceptions
6+
7+
This should make debugging easier. It wasn't very easy to figure out
8+
where the errors originated from (because of how the actual uncaught
9+
exception only happened with many concurrent builds inside a sandbox
10+
environment that is hard to debug).

packages/test-runner/src/startTestRunner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function startTestRunner(options: StartTestRunnerParams = {}) {
7373
if (autoExitProcess) {
7474
process.on('uncaughtException', error => {
7575
/* eslint-disable-next-line no-console */
76-
console.error(error);
76+
console.error(`Uncaught exception, stopping test runner..\n`, error);
7777
stop();
7878
});
7979
}

0 commit comments

Comments
 (0)