Skip to content

Commit 4c5b469

Browse files
committed
Refactor error processing
This commit simplifies error serialization, relying on the advanced IPC for child processes & worker threads. Unnecessary code has been removed. Possibly breaking changes: * Renamed and removed fields from the undocumented AssertionError class, including the raw values * Changes to the undocumented TAP output; stack traces are a bit worse, the rest is about the same but some fields have different names or values * `nyc` stack frames are no longer ignored; we assume you're using the native code coverage tools
1 parent e27183a commit 4c5b469

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+874
-1174
lines changed

lib/api.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,7 @@ export default class Api extends Emittery {
305305
const files = scheduler.storeFailedTestFiles(runStatus, this.options.cacheEnabled === false ? null : this._createCacheDir());
306306
runStatus.emitStateChange({type: 'touched-files', files});
307307
} catch (error) {
308-
if (error?.name === 'AggregateError') {
309-
for (const error_ of error.errors) {
310-
runStatus.emitStateChange({type: 'internal-error', err: serializeError('Internal error', false, error_)});
311-
}
312-
} else {
313-
runStatus.emitStateChange({type: 'internal-error', err: serializeError('Internal error', false, error)});
314-
}
308+
runStatus.emitStateChange({type: 'internal-error', err: serializeError(error)});
315309
}
316310

317311
timeoutTrigger.discard();

0 commit comments

Comments
 (0)