Revert @testing-library/jest-dom
v6 upgrade
#9713
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts #9673 and #9711.
With v6 of
@testing-library/jest-dom
,yarn rw type-check
fails in Redwood projects because it can't locate the types for@testing-libary/jest-dom
. They absorbed the definitely types package (@types/testing-library__jest-dom
) in this PR: testing-library/jest-dom#511. Here's an example of a failing run: https://github.com/redwoodjs/redwood/actions/runs/7213177056/job/19668365614?pr=9708.The logical thing to do is remove
@testing-libary/jest-dom
from thetypes
array inweb/tsconfig.json
, but when we do that we get a different failure from TS saying that it doesn't understand the extended matchers provided bytesting-library/jest-dom
liketoBeInTheDocument
.@Tobbe filed an issue in their repo here testing-library/jest-dom#559.
In the PR I linked to, the maintainer notes that...
Users don't have jest setup files in their project (we just point to a jest preset) or
@types/jest
as an explicit dev dependency.I took a look at it but couldn't crack it today. Instead of holding up other PRs in CI, better to revert it for now and come back to later when we have more leads.