This repository has been archived by the owner on Jul 5, 2021. It is now read-only.
Update dependency @testing-library/dom to v7 #247
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 PR contains the following updates:
^6.11.0
->^7.0.0
Release Notes
testing-library/dom-testing-library
v7.31.2
Compare Source
Bug Fixes
<output />
labelable (#968) (56a4c75)v7.31.1
Compare Source
Bug Fixes
v7.31.0
Compare Source
Features
screen
was passed instead of a DOM element (#949) (c273ed5)v7.30.4
Compare Source
Bug Fixes
jest.useRealTimers
not existing (#934) (1b19094)v7.30.3
Compare Source
Bug Fixes
v7.30.2
Compare Source
Bug Fixes
v7.30.1
Compare Source
Bug Fixes
v7.30.0
Compare Source
Features
v7.29.6
Compare Source
Bug Fixes
v7.29.5
Compare Source
Bug Fixes
v7.29.4
Compare Source
Bug Fixes
v7.29.3
Compare Source
Bug Fixes
v7.29.2
Compare Source
Bug Fixes
v7.29.1
Compare Source
Bug Fixes
v7.29.0
Compare Source
Features
v7.28.1
Compare Source
Bug Fixes
v7.28.0
Compare Source
Features
v7.27.1
Compare Source
Bug Fixes
v7.27.0
Compare Source
Features
v7.26.7
Compare Source
Bug Fixes
v7.26.6
Compare Source
Bug Fixes
v7.26.5
Compare Source
Bug Fixes
v7.26.4
Compare Source
Bug Fixes
v7.26.3
Compare Source
Bug Fixes
v7.26.2
Compare Source
Bug Fixes
v7.26.1
Compare Source
Bug Fixes
v7.26.0
Compare Source
Features
v7.25.0
Compare Source
Features
v7.24.5
Compare Source
Bug Fixes
v7.24.4
Compare Source
Bug Fixes
v7.24.3
Compare Source
Bug Fixes
[@deprecated](https://togithub.com/deprecated)
(#771) (68f8f81)v7.24.2
Compare Source
Bug Fixes
v7.24.1
Compare Source
Bug Fixes
v7.24.0
Compare Source
Features
v7.23.0
Compare Source
Features
v7.22.6
Compare Source
Bug Fixes
v7.22.5
Compare Source
Bug Fixes
v7.22.4
Compare Source
Bug Fixes
v7.22.3
Compare Source
Bug Fixes
v7.22.2
Compare Source
Bug Fixes
v7.22.1
Compare Source
Bug Fixes
v7.22.0
Compare Source
Features
{pressed: true}
for buttons (#729) (372ac60), closes #692v7.21.8
Compare Source
Bug Fixes
v7.21.7
Compare Source
Bug Fixes
v7.21.6
Compare Source
Bug Fixes
v7.21.5
Compare Source
Bug Fixes
v7.21.4
Compare Source
Bug Fixes
v7.21.3
Compare Source
Bug Fixes
v7.21.2
Compare Source
Bug Fixes
v7.21.1
Compare Source
Bug Fixes
Reverts
v7.21.0
Compare Source
Features
{checked: true}
for checkbox / radio (#692) (fcdeb31)v7.20.2
Compare Source
Bug Fixes
v7.20.1
Compare Source
Bug Fixes
v7.20.0
Compare Source
Features
v7.19.0
Compare Source
Features
v7.18.2
Compare Source
Bug Fixes
v7.18.1
Compare Source
Bug Fixes
v7.18.0
Compare Source
Features
v7.17.2
Compare Source
Bug Fixes
v7.17.1
Compare Source
Bug Fixes
v7.17.0
Compare Source
Features
🚨 It's possible this will break your tests if you were working around our limitations before. Fixing the issue should be straightforward. Here's an example from my (Kent's) own workaround:
// using fake timers to skip debounce time jest.useFakeTimers() userEvent.clear(notesTextarea) userEvent.type(notesTextarea, newNotes) - act(() => jest.runAllTimers()) await screen.findByLabelText(/loading/i) // wait for the loading spinner to go away await waitForLoadingToFinish() jest.useRealTimers()
Notice that all I needed to change was removing manually advancing timers because now we handle things automatically for you 🎉
v7.16.3
Compare Source
Bug Fixes
generic
(#664) (a2a3212)v7.16.2
Compare Source
Bug Fixes
v7.16.1
Compare Source
Bug Fixes
v7.16.0
Compare Source
Features
v7.15.1
Compare Source
Bug Fixes
v7.15.0
Compare Source
Features
v7.14.3
Compare Source
Bug Fixes
v7.14.2
Compare Source
Bug Fixes
v7.14.1
Compare Source
Bug Fixes
v7.14.0
Compare Source
Features
v7.13.0
Compare Source
Bug Fixes
Features
clipboardData
likedataTransfer
. (#585) (9592583)v7.12.0
Compare Source
Features
v7.11.0
Compare Source
Features
v7.10.1
Compare Source
Bug Fixes
v7.10.0
Compare Source
Features
v7.9.0
Compare Source
Features
v7.8.0
Compare Source
Features
eventWrapper
config for wrapping fireEvent (#600) (de9dd82)v7.7.3
Compare Source
Bug Fixes
v7.7.2
Compare Source
Bug Fixes
v7.7.1
Compare Source
Bug Fixes
v7.7.0
Compare Source
Features
v7.6.0
Compare Source
Features
v7.5.9
Compare Source
Bug Fixes
v7.5.8
Compare Source
Bug Fixes
v7.5.7
Compare Source
Bug Fixes
v7.5.6
Compare Source
Bug Fixes
v7.5.5
Compare Source
Bug Fixes
v7.5.4
Compare Source
Bug Fixes
v7.5.3
Compare Source
Bug Fixes
v7.5.2
Compare Source
Bug Fixes
selected
toByRoleOptions
(#561) (32a7bbb)v7.5.1
Compare Source
Bug Fixes
v7.5.0
Compare Source
Features
v7.4.0
Compare Source
Bug Fixes
Features
v7.3.0
Compare Source
Features
v7.2.2
Compare Source
Bug Fixes
v7.2.1
Compare Source
Bug Fixes
v7.2.0
Compare Source
Features
v7.1.4
Compare Source
Bug Fixes
v7.1.3
Compare Source
Bug Fixes
v7.1.2
Compare Source
Bug Fixes
v7.1.1
Compare Source
Bug Fixes
v7.1.0
Compare Source
Features
v7.0.4
Compare Source
Bug Fixes
v7.0.3
Compare Source
Bug Fixes
v7.0.2
Compare Source
Bug Fixes
v7.0.1
Compare Source
Bug Fixes
v7.0.0
Compare Source
Features
wait
withwaitFor
(read more in the Breaking changes list below) (2b641e1), closes #376 #416The new feature in
waitForElementToBeRemoved
is pretty cool. Here's what you had to do before:That still works, but you can now do this too:
Cool right!?
BREAKING CHANGES
Drop Node 8
Node 10 or greater is required. Node 8 is out of LTS (#459) (c3ab843), closes #430
MutationObserver shim removed.
MutationObserver is supported by all major browsers and recent versions of JSDOM. If you need, you can create your own shim (using
@sheerun/mutationobserver-shim
) and attach it to thewindow
. If you're on an old version of Jest, either update your version of Jest or usejest-environment-jsdom-sixteen
(#457) (e3fdb8e9)If you're using the latest version of
react-scripts
(Create React App), here are your options:Option 1:
Wait until the
react-scripts
updates to the latest version of Jest (subscribe to this PR)Option 2 (recommended):
Install
jest-environment-jsdom-sixteen
and then update yourtest
script:Option 3:
Add the MutationObserver constructor to
window
via@sheerun/mutationobserver-shim
:waitFor:
wait
is now deprecated in favor ofwaitFor
waitFor
satisfies the use cases ofwait
,waitForElement
, andwaitForDomChange
, so those have been deprecated (will be removed in the next major version). Here are some examples of how you can change those: