After CRA is upgraded to 5.0.1 (#862), there will be some new eslint warnings that will need some work.
Avoid wrapping Testing Library util calls in 'act'
Rendering of react components shouldn't be wrapped in act call. Instead, wrap the subsequent code in waitFor from @testing-library/react, ie: await waitfor(() => { ... })
Avoid direct Node access. Prefer using the methods from Testing Library.
Eliminate the usage of a manually created document and container element, and use the render function from @testing-library/react instead of react-dom
Replace container.querySelector with equivalent getBy... functions on screen from @testing-library/react. There is no equivalent for css class selectors, so an alternative will need to be found for identifying those elements.
After those are addressed, I don't know if more issues will crop up. Eslint doesn't seem too keen on showing all classes of issues at once.
After CRA is upgraded to 5.0.1 (#862), there will be some new eslint warnings that will need some work.
Avoid wrapping Testing Library util calls in 'act' Rendering of react components shouldn't be wrapped in
act
call. Instead, wrap the subsequent code inwaitFor
from@testing-library/react
, ie:await waitfor(() => { ... })
Avoid direct Node access. Prefer using the methods from Testing Library. Eliminate the usage of a manually created
document
andcontainer
element, and use therender
function from@testing-library/react
instead ofreact-dom
Replace
container.querySelector
with equivalentgetBy...
functions onscreen
from@testing-library/react
. There is no equivalent for css class selectors, so an alternative will need to be found for identifying those elements.After those are addressed, I don't know if more issues will crop up. Eslint doesn't seem too keen on showing all classes of issues at once.