18.0.0
See https://jestjs.io/blog/2016/12/15/2016-in-jest.html
- The testResultsProcessor function is now required to return the modified results.
- Removed
pitandmockImpl. UseitormockImplementationinstead. - Fixed re-running tests when
--bailis used together with--watch. pretty-formatis now merged into Jest.require('v8')now works properly in a test context.- Jest now clears the entire scrollback in watch mode.
- Added
expect.any,expect.anything,expect.objectContaining,expect.arrayContaining,expect.stringMatching. - Properly resolve
snapshotSerializers,setupFiles,transform,testRunnerandtestResultsProcessorinstead of usingpath.resolve. --testResultsProcessoris now exposed through the cli.- Renamed
--jsonOutputFileto--outputFile. - Added
jest-editor-supportfor vscode and Nuclide integration. - Fixed
test.concurrentunhandled promise rejections. - The Jest website is now auto-deployed when merging into master.
- Updated
testRegexto includetest.jsandspec.jsfiles. - Fixes for
babel-plugin-jest-hoistwhen usingjest.mockwith three arguments. - The
JSONglobal injest-environment-nodenow comes from the vm context instead of the parent context. - Jest does not print stack traces from babel any longer.
- Fake timers are reset when
FakeTimers.useTimers()is called. - Usage of Jest in watch mode can be hidden through
JEST_HIDE_USAGE. - Added
expect.assertions(number)which will ensure that a specified amount of assertions is made in one test. - Added
.toMatchSnapshot(?string)feature to give snapshots a name. - Escape regex in snapshots.
jest-react-nativewas deprecated and now forwardsreact-native.- Added
.toMatchObjectmatcher. - Further improve printing of large objects.
- Fixed
NaN% Failedin the OS notification when using--notify. - The first test run without cached timings will now use separate processes instead of running in band.
- Added
.toHavePropertymatcher. - Fixed
Map/Setcomparisons. test.concurrentnow works with--testNamePattern.