Jest v0.7.0 Release Notes
-
- 🛠 Fixed a memory leak with test contexts. Jest now properly cleans up test environments after each test. Added
--logHeapUsage
to log memory usage after each test. Note: this is option is meant for debugging memory leaks and might significantly slow down your test run. - ✂ Removed
mock-modules
,node-haste
andmocks
virtual modules. This is a breaking change of undocumented public API. Usage of this API can safely be automatically updated through an automated codemod: - Example: http://astexplorer.net/#/zrybZ6UvRA
- ⚡️ Codemod: https://github.com/cpojer/js-codemod/blob/main/transforms/jest-update.js
- jscodeshift: https://github.com/facebook/jscodeshift
- ✂ Removed
navigator.onLine
andmockSetReadOnlyProperty
from the global jsdom environment. Usewindow.navigator.onLine = true;
in your test setup andObject.defineProperty
instead.
- 🛠 Fixed a memory leak with test contexts. Jest now properly cleans up test environments after each test. Added