Releases: jestjs/jest
Releases · jestjs/jest
17.0.1
17.0.0
- Added
expect.extend. - Properly resolve modules with platform extensions on react-native.
- Added support for custom snapshots serializers.
- Updated to Jasmine 2.5.2.
- Big diffs are now collapsed by default in snapshots and assertions. Added
--expand(or-e) to show the full diff. - Replaced
scriptPreprocessorwith the newtransformoption. - Added
jest.resetAllMockswhich replacesjest.clearAllMocks. - Fixes for react-native preset.
- Fixes for global built in objects in
jest-environment-node. - Create mock objects in the vm context instead of the parent context.
.babelrcis now part of the transform cache key inbabel-jest.- Fixes for docblock parsing with haste modules.
- Exit with the proper code when the coverage threshold is not reached.
- Implemented file watching in
jest-haste-map. --jsonnow includes information about individual tests inside a file.
16.0.2
16.0.1
16.0.0
- Previously failed tests are now always run first.
- A new concurrent reporter shows currently running tests, a test summary, a progress bar and estimated remaining time if possible.
- Improved CLI colors.
jest <pattern>is now case-insensitive.- Added
it.only,it.skip,test.only,test.skipandxtest. - Added
--testNamePattern=patternor-t <pattern>to run individual tests in test files. - Jest now warns for duplicate mock files.
- Pressing
a,o,p,qorenterwhile tests are running in the watch mode, the test run will be interrupted. --bailnow works together with--watch.- Added
test.concurrentfor concurrent async tests. - Jest now automatically considers files and tests with the
.jsxextension. - Added
jest.clearAllMocksto clear all mocks manually. - Rewrote Jest's snapshot implementation.
jest-snapshotcan now be more easily integrated into other test runners and used in other projects. - This requires most snapshots to be updated when upgrading Jest.
- Objects and Arrays in snapshots are now printed with a trailing comma.
- Function names are not printed in snapshots any longer to reduce issues with code coverage instrumentation and different Node versions.
- Snapshots are now sorted using natural sort order.
- Snapshots are not marked as obsolete any longer when using
fitor when an error is thrown in a test. - Finished migration of Jasmine matchers to the new Jest matchers.
- Pretty print
toHaveBeenLastCalledWith,toHaveBeenCalledWith,lastCalledWithandtoBeCalledWithfailure messages. - Added
toBeInstanceOfmatcher. - Added
toContainEqualmatcher. - Added
toThrowErrorMatchingSnapshotmatcher. - Improved
moduleNameMapperresolution. - Module registry fixes.
- Fixed invocation of the
setupTestFrameworkScriptFilescript to make it easier to use chai together with Jest. - Removed react-native special case in Jest's configuration.
- Added
--findRelatedTests <fileA> <fileB>cli option to run tests related to the specified files. - Added
jest.deepUnmocktobabel-plugin-jest-hoist. - Added
jest.runTimersToTimewhich is useful together with fake timers. - Improved automated mocks for ES modules compiled with babel.
15.1.1
15.1.0
- Pretty printer updates for React and global window objects.
jest-runtimeoverwrites automocking from configuration files.- Improvements for watch mode on Windows.
- afterAll/afterEach/beforeAll/beforeEach can now return a Promise and be used together with async/await.
- Improved stack trace printing on Node 4.
15.0.2
15.0.1
15.0.0
- See https://jestjs.io/blog/2016/09/01/jest-15.html
- Jest by default now also recognizes files ending in
.spec.jsand.test.jsas test files. - Completely replaced most Jasmine matchers with new Jest matchers.
- Rewrote Jest's CLI output for test failures and summaries.
- Added
--envoption to override the default test environment. - Disabled automocking, fake timers and resetting the module registry by default.
- Added
--watchAll, made--watchinteractive and added the ability to update snapshots and select test patterns in watch mode. - Jest uses verbose mode when running a single test file.
- Console messages are now buffered and printed along with the test results.
- Fix
testEnvironmentresolution to preferjest-environment-{name}instead of{name}only. This prevents a module colision when usingjsdomas test environment. moduleNameMappernow uses a resolution algorithm.- Improved performance for small test runs.
- Improved API documentation.
- Jest now works properly with directories that have special characters in them.
- Improvements to Jest's own test infra by merging integration and unit tests. Code coverage is now collected for Jest.
- Added
global.globalto the node environment. - Fixed babel-jest-plugin-hoist issues with functions called
mock. - Improved jest-react-native preset with mocks for ListView, TextInput, ActivityIndicator and ScrollView.
- Added
collectCoverageFromto collect code coverage from untested files. - Rewritten code coverage support.