Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion e2e/__tests__/fatalWorkerError.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ test('fails a test that terminates the worker with a fatal error', () => {
expect(exitCode).not.toBe(0);
expect(numberOfTestsPassed).toBe(Object.keys(testFiles).length - 1);
expect(stderr).toContain('FAIL __tests__/fatalWorkerError.test.js');
expect(stderr).toContain('Call retries were exceeded');
expect(stderr).toContain(
'Jest worker encountered 4 child process exceptions, exceeding retry limit',
);
});
4 changes: 3 additions & 1 deletion packages/jest-worker/src/workers/ChildProcessWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export default class ChildProcessWorker implements WorkerInterface {
// coming from the child. This avoids code duplication related with cleaning
// the queue, and scheduling the next call.
if (this._retries > this._options.maxRetries) {
const error = new Error('Call retries were exceeded');
const error = new Error(
`Jest worker encountered ${this._retries} child process exceptions, exceeding retry limit`,
);

this._onMessage([
PARENT_MESSAGE_CLIENT_ERROR,
Expand Down