There's little value in waitFor if one has to advance timers by themselves.
How:
Copy implementation from @testing-library/dom.
There's an opportunity to write a more generic waitFor that we can share across Testing Library that specific host configs build on top on (e.g. also running MutationObserver in /dom). But that requires more coordination (starting with an extensive test suite). For now this hopefully suffices (pending testing in actual codebases).
What:
Closes https://github.com/testing-library/react-hooks-testing-library/issues/873
Why:
There's little value in
waitFor
if one has to advance timers by themselves.How:
Copy implementation from
@testing-library/dom
.There's an opportunity to write a more generic
waitFor
that we can share across Testing Library that specific host configs build on top on (e.g. also running MutationObserver in/dom
). But that requires more coordination (starting with an extensive test suite). For now this hopefully suffices (pending testing in actual codebases).Checklist: