Open pschyma opened 1 year ago
Can you please share a minimal reproduction? I tried reproducing this one with the latest RTL version which is using @testing-library/dom@9.0.0
and this issue didn't reproduce.
Posting here because I also ran into these issues after regenerating my app's package-lock.json
.
I had installed versions:
@testing-library/react
: 12.1.5
@testing-library/user-event
: 14.4.3
After regenerating the package-lock.json
, two different versions of @testing-library/dom
were downloaded:
With multiple versions of @testing-library/dom
, I experienced the same issues mentioned in this issue.
I was able to resolve the issues by doing either of the following:
@testing-library/dom@^8
package.json
: "overrides": {
"@testing-library/react": {
"@testing-library/dom": "^9"
}
}
I think the best solution would be to patch @testing-library/react
v12/13 to allow for @testing-library/dom
v8 & v9, but I don't think it's maintained anymore since it's two major releases behind š¢ .
@testing-library/dom
version: 9.0.0Relevant code or config:
What you did:
Updated from version 8.4.0 to 9.0.0 and rerun test.
What happened:
I tried the
hidden: true
option, but there was no change.Reproduction:
Problem description:
Suggested solution: