Skip to content

Releases: jestjs/jest

22.2.1

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [jest-config] "all" takes precedence over "lastCommit" (#5486)

22.2.0

16 Aug 10:38
Compare
Choose a tag to compare

Features

  • [jest-runner] Move test summary to after coverage report (#4512)
  • [jest-cli] Added --notifyMode to specify when to be notified. (#5125)
  • [diff-sequences] New package compares items in two sequences to find a longest common subsequence. (#5407)
  • [jest-matcher-utils] Add comment option to matcherHint function (#5437)
  • [jest-config] Allow lastComit and changedFilesWithAncestor via JSON config (#5476)
  • [jest-util] Add deletion to process.env as well (#5466)
  • [jest-util] Add case-insensitive getters/setters to process.env (#5465)
  • [jest-mock] Add util methods to create async functions. (#5318)

Fixes

  • [jest-cli] Add trailing slash when checking root folder (#5464)
  • [jest-cli] Hide interactive mode if there are no failed snapshot tests (#5450)
  • [babel-jest] Remove retainLines from babel-jest (#5439)
  • [jest-cli] Glob patterns ignore non-require-able files (e.g. README.md) (#5199)
  • [jest-mock] Add backticks support (``) to mock a certain package via the __mocks__ folder. (#5426)
  • [jest-message-util] Prevent an ENOENT crash when the test file contained a malformed source-map. (#5405).
  • [jest] Add import-local to jest package. (#5353)
  • [expect] Support class instances in .toHaveProperty() and .toMatchObject matcher. (#5367)
  • [jest-cli] Fix npm update command for snapshot summary. (#5376, 5389)
  • [expect] Make rejects and resolves synchronously validate its argument. (#5364)
  • [docs] Add tutorial page for ES6 class mocks. (#5383)
  • [jest-resolve] Search required modules in node_modules and then in custom paths. (#5403)
  • [jest-resolve] Get builtin modules from node core. (#5411)
  • [jest-resolve] Detect and preserve absolute paths in moduleDirectories. Do not generate additional (invalid) paths by prepending each ancestor of cwd to the absolute path. Additionally, this fixes functionality in Windows OS. (#5398)

Chore & Maintenance

  • [jest-util] Implement watch plugins (#5399)

22.1.4

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [jest-util] Add "debug" method to "console" implementations (#5350)
  • [jest-resolve] Add condition to avoid infinite loop when node module package main is ".". (#5344))

Features

  • [jest-cli] --changedSince: allow selectively running tests for code changed since arbitrary revisions. (#5312)

22.1.3

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [jest-cli] Check if the file belongs to the checked project before adding it to the list, also checking that the file name is not explicitly blacklisted (#5341)
  • [jest-editor-support] Add option to spawn command in shell (#5340)

22.1.2

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [jest-cli] Check if the file belongs to the checked project before adding it to the list (#5335)
  • [jest-cli] Fix EISDIR when a directory is passed as an argument to jest. (#5317)
  • [jest-config] Added restoreMocks config option. (#5327)

22.1.1

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [*] Move from "process.exit" to "exit. (#5313)

22.1.0

16 Aug 10:38
Compare
Choose a tag to compare

Features

  • [jest-cli] Make Jest exit without an error when no tests are found in the case of --lastCommit, --findRelatedTests, or --onlyChanged options having been passed to the CLI
  • [jest-cli] Add interactive snapshot mode (#3831)

Fixes

  • [jest-cli] Use import-local to support global Jest installations. (#5304)
  • [jest-runner] Fix memory leak in coverage reporting (#5289)
  • [docs] Update mention of the minimal version of node supported (#4947)
  • [jest-cli] Fix missing newline in console message (#5308)
  • [jest-cli] --lastCommit and --changedFilesWithAncestor now take effect even when --onlyChanged is not specified. (#5307)

Chore & Maintenance

  • [filenames] Standardize folder names under integration-tests/ (#5298)

22.0.5

16 Aug 10:38
Compare
Choose a tag to compare

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)

22.0.4

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [jest-cli] New line before quitting watch mode. (#5158)

Features

  • [babel-jest] moduleFileExtensions not passed to babel transformer. (#5110)

Chore & Maintenance

  • [*] Tweaks to better support Node 4 (#5142)

22.0.2

16 Aug 10:38
Compare
Choose a tag to compare

Chore & Maintenance

  • [*] Tweaks to better support Node 4 (#5134)