Packages

jest-util

30.5.1 · 1 Sep 2026MIT156.2M / weekRepositoryHomepagenpmAtom feed

Your version

22.0.5

9 Jan 2018Where it was published

22.4.3 is the newest release of 22.x.

In short

7 new10 fixed3 internal

Release note

Fixes

  • jest-leak-detector: Removed the reference to weak. Now, parent projects must install it by hand for the module to work.

  • expect: Fail test when the types of stringContaining and stringMatching matchers do not match.

  • jest-cli: Treat dumb terminals as noninteractive

  • jest-cli: jest --onlyChanged --changedFilesWithAncestor now also works with git.

  • jest-config: Fix unexpected condition to avoid infinite recursion in Windows platform.

  • jest-config: Escape parentheses and other glob characters in rootDir before interpolating with testMatch.

  • jest-regex-util: Fix breaking change in --testPathPattern

  • expect: Do not override Error stack (with Error.captureStackTrace) for custom matchers.

  • pretty-format: Pretty format for DOMStringMap and NamedNodeMap

  • jest-cli: Use a better console-clearing string on Windows

Features

  • jest-jasmine: Allowed classes and functions as describe names.

  • jest-jasmine2: Support generator functions as specs.

  • jest-jasmine2: Allow spyOn with getters and setters.

  • jest-config: Allow configuration objects inside projects array

  • expect: Add support to .toHaveProperty matcher to accept the keyPath argument as an array of properties/indices.

  • jest-runner: Test environments are now passed a new options parameter. Currently this only has the console which is the test console that Jest will expose to tests.

  • jest-environment-jsdom: Pass the options.console to a custom instance of virtualConsole so jsdom is using the same console as the test.