Skip to content

jest run reports "A worker process has failed to exit gracefully ..."Β #524

@deej-split

Description

@deej-split
  • DOM Testing Library version: 7.2.1
  • node version: 10.15.3
  • npm (or yarn) version: 6.13.6

Relevant code or config:

require('@testing-library/dom');

What you did:

See above.

What happened:

Jest (?) is reporting the warning A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks. at the end of a test run

Reproduction:

Probably pretty hard. See below.

Problem description:

The problem is that when we require('@testing-library/dom');. (even if we never call configure() or any other RTL code) at the end of the test run of 3500 tests we get the above warning. Trying to subdivide the tests to find the "offending test", makes the problem go away. So, it isn't directly due to some misbehaving test.

Interestingly, if we use require('@testing-library/react'); and do not directly import .../dom we don't see the problem.

I'm not seriously expecting that you can fix this given the paucity of information I have to offer. And given that we're on React 15, node 10 (though current Jest) it is entirely possible that this is a result of some older version of things that doesn't happen on newer configurations. Instead, I'm filing this mainly to let you know this is happening, and to leave a record to allow others to know that someone else has seen this problem.

(the workaround appears to just be to not do any configuration of @testing-library/dom :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions