Skip to content

TypeError: Failed to execute 'createTreeWalker' on 'Document': parameter 1 is not of type 'Node'. #1165

@maxi-groldan

Description

@maxi-groldan

Hi!
I am develop two test using Testing Library and jest. If run each one separately they work successfully. If I run both together (describe), the second one always failed with the following message "TypeError: Failed to execute 'createTreeWalker' on 'Document': parameter 1 is not of type 'Node'.". They do not have any dependency between them. I searched on Internet but I did not find anything that can help me.
The error is thrown when I search a button with screen.getByTestId

Could you help me?

image

Config:
@testing-library/dom: 8.11.1
@testing-library/react: 12.1.2
@testing-library/user-event: 13.5.0

Node: 14.17.5

React: 17

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions