Sourced from @testing-library/dom's releases.
v8.0.0
8.0.0 (2021-06-23)
Recommendations
- If you're using
jestfake timers make sure you use modern timers jest 27:jest 26:-jest.useFakeTimers('legacy') +jest.useFakeTimers('modern') // jest.config.js -"timers": "legacy", +"timers": "modern",-jest.useFakeTimers() +jest.useFakeTimers('modern') // jest.config.js -"timers": "legacy", +"timers": "modern",chore
- Release v8 as stable (https://github.com/facebook/flipper/issues/979) (d347302)
BREAKING CHANGES
- Remove deprecated
waitFormDOMChange- Remove deprecated
waitForElement- The
timeoutinwaitFor(callback, { interval, timeout } )now uses the same clock asinterval. Previouslytimeoutwas always using the real clock whileintervalwas using the global clock which could've been mocked out. For the old behavior I'd recommendwaitFor(callback, { interval, timeout: Number.POSITIVE_INFINITY })and rely on your test runner to timeout considering real timers.<script />,<style />and comment nodes are now ignored by default inprettyDOM.If you whish to return to the old behavior, use a customfilterNodefunction. In this caseprettyDOM(element, { filterNode: () => true }).- node 10 is no longer supported. It reached its end-of-life on 30.04.2021.
v8.0.0-alpha.7
8.0.0-alpha.7 (2021-06-20)
Bug Fixes
- Consider
<output />labelable (https://github.com/facebook/flipper/issues/968) (56a4c75)v8.0.0-alpha.6
8.0.0-alpha.6 (2021-06-12)
... (truncated)
84ebc51 test(fake-timers): raf is now mocked in legacy fake timers (https://github.com/facebook/flipper/issues/986)d347302 chore: Release v8 as stable (https://github.com/facebook/flipper/issues/979)