Jest v25.5.0 Release Notes

Release Date: 2020-04-28 // about 4 years ago
  • ๐Ÿ”‹ Features

    • ๐Ÿ“ฆ [@jest/globals] New package so Jest's globals can be explicitly imported (#9801)
    • โœ… [jest-core] Show coverage of sources related to tests in changed files (#9769)
    • [jest-runtime] Populate require.cache (#9841)

    ๐Ÿ›  Fixes

    • ๐Ÿ“ฆ [*] Use graceful-fs directly in every package instead of relying on fs being monkey patched (#9443)
    • ๐Ÿ–จ [expect] Prints the Symbol name into the error message with a custom asymmetric matcher (#9888)
    • ๐Ÿ‘ [jest-circus, jest-jasmine2] Support older version of jest-runtime (#9903 & #9842)
    • [@jest/environment] Make sure not to reference Jest types (#9875)
    • ๐Ÿ–จ [jest-message-util] Code frame printing should respect --noStackTrace flag (#9866)
    • ๐Ÿ‘ [jest-runtime] Support importing CJS from ESM using import statements (#9850)
    • ๐Ÿ‘ [jest-runtime] Support importing parallel dynamic imports (#9858)
    • [jest-transform] Improve source map handling when instrumenting transformed code (#9811)

    ๐Ÿšง Chore & Maintenance

    • ๐Ÿคก [docs] Add an example for mocking non-default export class

    ๐ŸŽ Performance

    • โšก๏ธ [jest-resolve] Update resolve to a version using native realpath, which is faster than the default JS implementation (#9872)
    • [jest-resolve] Pass custom cached realpath function to resolve (#9873)
    • โœ… [jest-runtime] Add teardown method to clear any caches when tests complete (#9906)
    • [jest-runtime] Do not pass files required internally through transformation when loading them (#9900)
    • [jest-runtime] Use Maps instead of object literals as cache holders (#9901)