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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
- Adds a `conditional/check` to ensure the argument passed to `expect` is an object.
- Add unit tests for new `ObjectContaining` behavior.
- Remove `invalid/wrong` test case assertions for `ObjectContaining`.
- `[jest-worker]` Addresses incorrect state on exit ([#15610](https://github.com/jestjs/jest/pull/15610))

### Performance

Expand Down
3 changes: 2 additions & 1 deletion packages/jest-worker/src/workers/ChildProcessWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ export default class ChildProcessWorker
) {
if (
this.state === WorkerStates.OK ||
this.state === WorkerStates.STARTING
this.state === WorkerStates.STARTING ||
this.state === WorkerStates.SHUT_DOWN
) {
this.state = WorkerStates.OUT_OF_MEMORY;
}
Expand Down
3 changes: 1 addition & 2 deletions packages/jest-worker/src/workers/WorkerAbstract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ export default abstract class WorkerAbstract
* killed off.
*/
protected _shutdown(): void {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funny thing
it was even intentionally ignored before 😅

this.state === WorkerStates.SHUT_DOWN;
this.state = WorkerStates.SHUT_DOWN;

// End the permanent stream so the merged stream end too
if (this._fakeStream) {
Expand Down
Loading