Skip to content

22.0.5

Compare
Choose a tag to compare
@SimenB SimenB released this 16 Aug 10:38
· 4251 commits to main since this release

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. (#5069)
  • [jest-cli] Treat dumb terminals as noninteractive (#5237)
  • [jest-cli] jest --onlyChanged --changedFilesWithAncestor now also works with git. (#5189)
  • [jest-config] fix unexpected condition to avoid infinite recursion in Windows platform. (#5161)
  • [jest-config] Escape parentheses and other glob characters in rootDir before interpolating with testMatch. (#4838)
  • [jest-regex-util] Fix breaking change in --testPathPattern (#5230)
  • [expect] Do not override Error stack (with Error.captureStackTrace) for custom matchers. (#5162)
  • [pretty-format] Pretty format for DOMStringMap and NamedNodeMap (#5233)
  • [jest-cli] Use a better console-clearing string on Windows (#5251)

Features

  • [jest-jasmine] Allowed classes and functions as describe names. (#5154)
  • [jest-jasmine2] Support generator functions as specs. (#5166)
  • [jest-jasmine2] Allow spyOn with getters and setters. (#5107)
  • [jest-config] Allow configuration objects inside projects array (#5176)
  • [expect] Add support to .toHaveProperty matcher to accept the keyPath argument as an array of properties/indices. (#5220)
  • [docs] Add documentation for .toHaveProperty matcher to accept the keyPath argument as an array of properties/indices. (#5220)
  • [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. (#5223)
  • [jest-environment-jsdom] pass the options.console to a custom instance of virtualConsole so jsdom is using the same console as the test. (#5223)

Chore & Maintenance

  • [docs] Describe the order of execution of describe and test blocks. (#5217, #5238)
  • [docs] Add a note on moduleNameMapper ordering. (#5249)