jest-util
30.5.1 · 1 Sep 2026MIT156.2M / weekRepositoryHomepagenpmAtom feed
146 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 27.x
27.0.1
25 May 2021jest-environment-jsdom: Bump version of JSDOM to avoid deprecated
requestpackage
- 26.x
26.6.2
2 Nov 2020jest-core: Add
findRelatedTestsandnonFlagArgsin allowed config options forupdateConfigAndRunin watch pluginsbabel-plugin-jest-hoist: Preserve order of hoisted mock nodes within containing block
babel-plugin-jest-hoist: Hoist pure constants to support experimental JSX transform in hoisted mocks
Features
jest-core: Add
findRelatedTestsandnonFlagArgsin allowed config options forupdateConfigAndRunin watch plugins
Fixes
babel-plugin-jest-hoist: Preserve order of hoisted mock nodes within containing block
babel-plugin-jest-hoist: Hoist pure constants to support experimental JSX transform in hoisted mocks
babel-preset-jest: Update
babel-preset-current-node-syntaxto support top level awaitexpect: Revert "Fix
objectContainingto work recursively into sub-objects (#10508)"jest-circus, jest-jasmine2: Don't assume
stackis always a stringjest-config: Fix bug introduced in watch mode by PR #10678
jest-config: Throw correct error for missing preset modules
jest-resolve-dependencies: Resolve mocks as dependencies
jest-runtime: Handle file URLs in dynamic imports
jest-runtime, babel-jest: Pass more ESM options to
@jest/transformjest-runtime: Properly inject
extraGlobalsinto the runtimejest-transform: Link to ESM docs on syntax errors
26.6.1
23 Oct 2020jest-runtime: Support named exports from CommonJS as named ES Module imports
jest-validate: Add support for
recursiveDenylistoption as an alternative torecursiveBlacklistexpect: Fix
objectContainingto work recursively into sub-objects
Features
jest-runtime: Support named exports from CommonJS as named ES Module imports
jest-validate: Add support for
recursiveDenylistoption as an alternative torecursiveBlacklist
Fixes
expect: Fix
objectContainingto work recursively into sub-objectsjest-cli, jest-core, jest-config, jest-types: Fix
--onlyFailuresflag to work in non-watch modejest-config: Fix for the
jest.config.tscompiler to not interfere withtsconfig.jsonfilesjest-message-util: Update to work properly with Node 15
jest-mock: Allow to mock methods in getters (TypeScript 3.9 export)
26.6.0
19 Oct 2020jest-cli, jest-config: Add support for the
jest.config.tsconfiguration filejest-config: Simplify transform RegExp
jest-fake-timers: Lazily instantiate mock timers
Features
jest-cli, jest-config: Add support for the
jest.config.tsconfiguration file
Fixes
jest-config: Simplify transform RegExp
jest-fake-timers: Lazily instantiate mock timers
jest-runtime:
require.mainis no longerundefinedwhen usingjest.resetModules@jest/types: Add missing values for
timers
26.5.2
6 Oct 2020*: Revert usage of Escalade and rollback Yargs to v15 as it breaks Node 13
jest-circus: Setup globals before emitting
setup, and include Jest globals in thesetuppayloadjest-mock: Fix typings for
mockResolvedValue,mockResolvedValueOnce,mockRejectedValueandmockRejectedValueOnce
26.5.0
5 Oct 2020jest-circus, jest-config, jest-runtime: Add new
injectGlobalsconfig and CLI option to disable injecting global variables into the runtimejest-each: Fixes
.eachtype to always be callablejest-runner: Add support for
moduleLoaders withdefaultexports
Features
jest-circus, jest-config, jest-runtime: Add new
injectGlobalsconfig and CLI option to disable injecting global variables into the runtimejest-each: Fixes
.eachtype to always be callablejest-runner: Add support for
moduleLoaders withdefaultexports@jest/create-cache-key-function: Added a new package for creating cache keys
Fixes
jest-circus, jest-jasmine2: Find correct location for
test.eachtestsjest-console: Add
Consoleconstructor toconsoleobjectjest-globals: Fix lifecycle hook function types
jest-runtime: Remove usage of
vm.compileFunctiondue to a performance issue
26.3.0
10 Aug 2020- breaking
jest-worker: Downgrade minimum node version to 10.13
jest-circus, jest-jasmine2: Include
failureDetailsproperty in test resultsjest-each, jest-jasmine, jest-circus: Add support for
.concurrent.each
Features
jest-circus, jest-jasmine2: Include
failureDetailsproperty in test resultsjest-each, jest-jasmine, jest-circus: Add support for
.concurrent.each
Fixes
jest-config: Add
.pnp.jstotransformIgnorePatternsdefaultsjest-leak-detector: Wait properly for GC runs due to changes in Node 14.7
- breaking
jest-worker: Downgrade minimum node version to 10.13
26.2.0
30 Jul 2020[jest-core, jest-circus, jest-reporter, jest-runner]Added support for reporting individual test cases using jest-circus[jest-config, jest-reporter, jest-runner, jest-test-sequencer]AddslowTestThresholdconfiguration optionjest-haste-map: Watchman crawler now includes dotfiles
Features
[jest-core, jest-circus, jest-reporter, jest-runner]Added support for reporting individual test cases using jest-circus[jest-config, jest-reporter, jest-runner, jest-test-sequencer]AddslowTestThresholdconfiguration optionjest-haste-map: Watchman crawler now includes dotfiles
jest-worker: Added support for workers to send custom messages to parent in jest-worker
jest-worker: Support passing
resourceLimitspretty-format: Added support for serializing custom elements (web components)
Fixes
expect: Match symbols and bigints in
any()jest-changed-files: Use
git diffinstead ofgit logfor--changedSincejest-console: Add missing
console.timeLogfor compatibility with Nodejest-haste-map: Check
findbinary supports the-inameparameterjest-snapshot: Strip added indentation for inline error snapshots
26.1.0
23 Jun 2020jest-mock: Export
Mock,MockInstance,SpyInstancetypesjest-config: Support config files exporting (
async)functionsjest-cli, jest-core: Add
--selectProjectsCLI argument to filter test suites by project name
Features
jest-mock: Export
Mock,MockInstance,SpyInstancetypesjest-config: Support config files exporting (
async)functionsjest-cli, jest-core: Add
--selectProjectsCLI argument to filter test suites by project namejest-cli, jest-init: Add
coverageProvidertojest --initprompts
Fixes
jest-console:
getConsoleOutputto receive global stack trace config and use it to format stack tracejest-jasmine2: Stop adding
:after an error that has no messagejest-diff: Control no diff message color with
commonColorin diff optionsjest-snapshot: Fix TypeScript compilation
Performance
jest-core, jest-transform, jest-haste-map: Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances
26.0.1
5 May 2020jest-circus: Backward compatibility for deprecated
DescribeBlock.teststo not break e.g. Detox reporter
26.0.0
4 May 2020- breaking
jest-environment-jsdom: Upgrade
jsdomto v16 - breaking
jest-circus: Fail tests if a test takes a done callback and have return values
- breaking
jest-circus: Throw a proper error if a test / hook is defined asynchronously
Features
- breaking
jest-environment-jsdom: Upgrade
jsdomto v16 @jest/fake-timers: Add possibility to use a modern implementation of fake timers, backed by
@sinonjs/fake-timersjest-runtime: Add
createMockFromModuleas an alias forgenMockFromModule
Fixes
babel-jest: Handle
nullbeing passed tocreateTransformer[jest-circus, jest-console, jest-jasmine2, jest-reporters, jest-util, pretty-format]Fix time durating formatting and consolidate time formatting code- breaking
jest-circus: Fail tests if a test takes a done callback and have return values
- breaking
jest-circus: Throw a proper error if a test / hook is defined asynchronously
jest-circus: Throw more descriptive error if hook is defined inside test
- breaking
jest-circus: Align execution order of tests to match
jasmine's top to bottom order - breaking
jest-config, jest-resolve: Remove support for
browserfield jest-haste-map: Stop reporting files as changed when they are only accessed
jest-resolve: Show relative path from root dir for
module not founderrorsjest-runtime: Fix absolute path moduleNameMapper + jest.mock bug
Chore & Maintenance
- breaking
*: TypeScript definitions requires a minimum of TypeScript v3.8
- breaking
*: Drop support for Node 8
- breaking
expect, jest-mock, pretty-format: Remove
build-es5from package - breaking
@jest/fake-timers, @jest/environment: Rename
LolexFakeTimerstoModernFakeTimers - breaking
jest-haste-map: Removed
providesModuleNodeModules - breaking
jest-runtime: Remove long-deprecated
require.requireActualandrequire.requireMockmethods
- 25.x
25.5.0
28 Apr 2020@jest/globals: New package so Jest's globals can be explicitly imported
jest-core: Show coverage of sources related to tests in changed files
jest-runtime: Populate
require.cache
Features
@jest/globals: New package so Jest's globals can be explicitly imported
jest-core: Show coverage of sources related to tests in changed files
jest-runtime: Populate
require.cache
Fixes
*: Use
graceful-fsdirectly in every package instead of relying onfsbeing monkey patchedexpect: Prints the Symbol name into the error message with a custom asymmetric matcher
jest-circus, jest-jasmine2: Support older version of
jest-runtime(#9903 & #9842)@jest/environment: Make sure not to reference Jest types
jest-message-util: Code frame printing should respect
--noStackTraceflagjest-runtime: Support importing CJS from ESM using
importstatementsjest-runtime: Support importing parallel dynamic
importsjest-transform: Improve source map handling when instrumenting transformed code
Performance
jest-resolve: Update
resolveto a version using nativerealpath, which is faster than the default JS implementationjest-resolve: Pass custom cached
realpathfunction toresolvejest-runtime: Add
teardownmethod to clear any caches when tests completejest-runtime: Do not pass files required internally through transformation when loading them
jest-runtime: Use
Maps instead of object literals as cache holders
25.4.0
19 Apr 2020expect: Support
async functions intoThrowjest-console: Add code frame to
console.errorandconsole.warn
expect: Support
async functions intoThrowjest-console: Add code frame to
console.errorandconsole.warnjest-runtime, jest-jasmine2, jest-circus: Experimental, limited ECMAScript Modules support (#9772 & #9842)
Fixes
expect: Restore support for passing functions to
toHaveLengthmatcherjest-changed-files:
--only-changedshould include staged filesjest-circus: Throw on nested test definitions
jest-each:
eachwill throw an error when called with too many argumentsjest-runner: Don't print warning to stdout when using
--json
25.3.0
8 Apr 2020babel-jest: Support passing
supportsDynamicImportandsupportsStaticESMbabel-preset-jest: Enable all syntax plugins not enabled by default that works on current version of Node
jest-circus: Enable writing async test event handlers
Features
babel-jest: Support passing
supportsDynamicImportandsupportsStaticESMbabel-preset-jest: Enable all syntax plugins not enabled by default that works on current version of Node
jest-circus: Enable writing async test event handlers
jest-runtime, @jest/transformer: Support passing
supportsDynamicImportandsupportsStaticESM
25.2.6
2 Apr 2020Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.
25.2.5
2 Apr 2020@jest/console: Fix
typescript<@3.8compatibility in published types
Fixes
@jest/console: Fix
typescript<@3.8compatibility in published types
25.2.3
26 Mar 2020*: Verify all packages are properly downleveled for older versions of TypeScript
25.2.1
26 Mar 2020*: Downlevel TypeScript definitions files for compatibility with TS<3.8
25.2.0
25 Mar 2020- breaking
jest-haste-map: Remove
mapperoption jest-config: Support ESM config files with
.jsextension (#9573).jest-runtime: Override
module.createRequireto return a Jest-compatiblerequirefunction
Features
jest-config: Support ESM config files with
.jsextension (#9573).jest-runtime: Override
module.createRequireto return a Jest-compatiblerequirefunction- breaking
jest-haste-map: Remove
mapperoption *: Support array of paths for
moduleNameMapperaliasesjest-reporters: Adds ability to pass options to the istanbul-reporter through
coverageReportersjest-runtime: Require stack when a module cannot be resolved
jest-transform:
writeCacheFileno longer callsfsync
Fixes
expect: Handle readonly properties correctly
jest-cli: Set
coverageProvidercorrectly when provided in configjest-cli: Allow specifying
.cjsand.mjsconfig files by--configCLI optionjest-cli: Update yargs to fix CLI flag overriding
jest-config: Treat
setupFilesAfterEnvlikesetupFileswhen normalizing configs against presetsjest-config: Support
.mjsconfig files on Windows as welljest-config: Verify
rootDirand allrootsare directoriesjest-config: Ensure pattern of
replacePosixSepis a stringjest-haste-map: Fix crash on unix based systems without find
jest-jasmine2: Fix
--testNamePatternmatching withconcurrenttestsjest-matcher-utils: Fix diff highlight of symbol-keyed object.
@jest/reporters: Notifications should be fire&forget rather than having a timeout
jest-resolve: Fix module identity preservation with symlinks and browser field resolution
jest-resolve: Do not confuse directories with files
jest-resolve:
moduleNameMappershould take precedence over Node core modulesjest-runtime: Reset
isolateModulesif it failsjest-runtime: Yarn PnP errors displayed to the user
jest-snapshot: Downgrade semver to v6 to support node 8
jest-snapshot: Properly indent new snapshots in the presences of existing ones
jest-transform: Correct sourcemap behavior for transformed and instrumented code
jest-transform: Allow instrumentation of transformed files with weird file extensions
@jest/types: Make
ConfigGlobalsan interface to allow for declaration merging.pretty-format: Export
OldPlugintype
Performance
jest-haste-map: Reduce number of
lstatcalls in node crawler
25.1.0
22 Jan 2020- breaking
jest-config: Set default display name color based on runner
- breaking
jest-config: Support
.mjsconfig files - breaking
jest-diff: Export as ECMAScript module
Features
babel-plugin-jest-hoist: Show codeframe on static hoisting issues
babel-plugin-jest-hoist: Add
BigInttoALLOWED_IDENTIFIERSbabel-preset-jest: Add
@babel/plugin-syntax-bigintexpect: Add
BigIntsupport totoBeGreaterThan,toBeGreaterThanOrEqual,toBeLessThanandtoBeLessThanOrEqualexpect, jest-matcher-utils: Display change counts in annotation lines
expect, jest-snapshot: Support custom inline snapshot matchers
jest-config: Throw the full error message and stack when a Jest preset is missing a dependency
- breaking
jest-config: Set default display name color based on runner
jest-config: Merge preset globals with project globals
jest-config: Support
.cjsconfig files- breaking
jest-config: Support
.mjsconfig files jest-core: Support reporters as default exports
jest-core: Support
--findRelatedTestspaths case insensitivity on Windowsjest-diff: Add options for colors and symbols
- breaking
jest-diff: Export as ECMAScript module
jest-diff: Add
includeChangeCountsand renameIndicatoroptionsjest-diff: Add
changeColorandpatchColoroptionsjest-diff: Add
trailingSpaceFormatteroption and replace cyan withcommonColorjest-diff: Add
firstOrLastEmptyLineReplacementoption and export 3diffLinesfunctionsjest-environment: Add optional
getVmContextnext torunScript(#9252 & #9428)jest-environment-jsdom: Add
fakeTimersLolexjest-environment-node: Add
fakeTimersLolexjest-environment-node: Add
queueMicrotaskjest-environment-node: Implement
getVmContext(#9252 & #9428)@jest/fake-timers: Add Lolex as implementation of fake timers
jest-get-type: Add
BigIntsupport.jest-matcher-utils: Add
BigIntsupport toensureNumbersensureActualIsNumber,ensureExpectedIsNumberjest-matcher-utils: Ignore highlighting matched asymmetricMatcher in diffs
jest-reporters: Export utils for path formatting
jest-reporters: Provides global coverage thresholds as watermarks for istanbul
jest-runner: Warn if a worker had to be force exited
- breaking
jest-runtime: Do not export
ScriptTransformer- it can be imported from@jest/transforminstead jest-runtime: Use
JestEnvironment.getVmContextandvm.compileFunctionif available to avoid the module wrapper (#9252 & #9428)jest-snapshot: Display change counts in annotation lines
- breaking
jest-snapshot: Improve report when the matcher has properties
jest-snapshot: Improve colors when snapshots are updatable
jest-snapshot: Ignore indentation for most serialized objects
jest-transform: Create
createTranspilingRequirefunction for easy transpiling modules- breaking
jest-transform: Return transformed code as a string, do not wrap in
vm.Script @jest/test-result: Create method to create empty
TestResult- breaking
jest-worker: Return a promise from
end(), resolving with the information whether workers exited gracefully jest-reporters: Transform file paths into hyperlinks
Fixes
expect: Display
expectedDiffmore carefully intoBeCloseToexpect: Avoid incorrect difference for subset when
toMatchObjectfailsexpect: Consider all RegExp flags for equality
- breaking
expect: Consider primitives different from wrappers instantiated with
new expect: Prevent maintaining RegExp state between multiple tests
expect: Fix subsetEquality false circular reference detection
jest-config: Use half of the available cores when
watchAllmode is enabledjest-config: Fix Jest multi project runner still cannot handle exactly one project
jest-console: Add missing
console.groupcalls toNullConsolejest-core: Don't include unref'd timers in --detectOpenHandles results
jest-core: Limit number of workers when creating haste maps in projects
jest-diff: Do not inverse format if line consists of one change
jest-diff: Rename some new options and change their default values
jest-environment-node: Fix
TextEncoder.encodenot referencing same globalUint8Arrayconstructorjest-fake-timers:
getTimerCountwill not include cancelled immediatesjest-fake-timers: Support
util.promisifyonsetTimeoutjest-jasmine2, jest-circus: Improve error message format for Node's assert.fail
- breaking
jest-leak-detector: Use
weak-napiinstead ofweakpackage jest-mock: Fix for mockReturnValue overriding mockImplementationOnce
jest-reporters: Make node-notifier an optional dependency
jest-reporters: Make all arguments to methods on
BaseReporteroptional: Set MODULE_NOT_FOUND as error code when module is not resolved from paths
jest-resolve-dependencies: Handle dynamic dependencies correctly even when using module maps
jest-snapshot: Remove only the added newlines in multiline snapshots
jest-snapshot: Distinguish empty string from external snapshot not written
- breaking
jest-snapshot: Distinguish empty string from internal snapshot not written
- breaking
jest-snapshot: Remove
reportmethod and throw matcher errors jest-snapshot: Omit irrelevant
receivedproperties when property matchers failjest-transform: Properly cache transformed files across tests
jest-transform: Don't fail the test suite when a generated source map is invalid
- breaking
jest-types: Use less
null | undefinedin config types jest-util: Allow querying process.domain
pretty-format: Correctly detect memoized elements
pretty-format: Fix pretty-format to respect displayName on forwardRef
Chore & Maintenance
- breaking
*: Drop support for Node 6
- breaking
*: Upgrade to Micromatch v4
- breaking
babel-plugin-jest-hoist: Use ESM exports
- breaking
jest: Use ESM exports
- breaking
jest-cli: Use ESM exports
- breaking
jest-cli: Remove re-exports from
@jest/core - breaking
jest-environment-jsdom: Upgrade JSDOM from v11 to v15
- breaking
jest-reporters: Upgrade Istanbul dependencies, which are used for code coverage
- breaking
jest-util: Remove deprecated exports
- breaking
jest-validate: Use ESM exports
25.0.0
22 Aug 2019- 24.x
24.9.0
16 Aug 2019expect: Highlight substring differences when matcher fails, part 1
expect: Highlight substring differences when matcher fails, part 2
expect: Improve report when mock-spy matcher fails, part 1
Features
expect: Highlight substring differences when matcher fails, part 1
expect: Highlight substring differences when matcher fails, part 2
expect: Improve report when mock-spy matcher fails, part 1
expect: Improve report when mock-spy matcher fails, part 2
expect: Improve report when mock-spy matcher fails, part 3
expect: Improve report when mock-spy matcher fails, part 4
expect: Throw matcher error when received cannot be jasmine spy
expect: Improve report when negative CalledWith assertion fails
expect: Improve report when positive CalledWith assertion fails
expect: Display equal values for ReturnedWith similar to CalledWith
expect, jest-snapshot: Change color from green for some args in matcher hints
jest-snapshot: Highlight substring differences when matcher fails, part 3
jest-core: Improve report when snapshots are obsolete
jest-cli: Improve chai support (with detailed output, to match jest exceptions)
*: Manage the global timeout with
--testTimeoutcommand line argument.pretty-format: Render custom displayName of memoized components
jest-validate: Allow
maxWorkersas part of thejest.config.jsjest-runtime: Allow passing configuration objects to transformers
@jest/core, @jest/test-sequencer: Support async sort in custom
testSequencerjest-runtime, @jest/fake-timers: Add
jest.advanceTimersToNextTimer@jest-transform: Extract transforming require logic within
jest-coreinto@jest-transformjest-matcher-utils: Add color options to
matcherHintjest-circus/jest-jasmine2: Give clearer output for Node assert errors
jest-runner: Export all types in the type signature of
jest-runner
Fixes
jest-cli: Detect side-effect only imports when running
--onlyChangedor--changedSincejest-cli: Allow
--maxWorkersto work with % input againbabel-plugin-jest-hoist: Expand list of whitelisted globals in global mocks
jest-core: Make watch plugin initialization errors look nice
jest-snapshot: Prevent inline snapshots from drifting when inline snapshots are updated
jest-haste-map: Don't throw on missing mapper in Node crawler
jest-core: Fix incorrect
passWithNoTestswarningjest-snapshots: Fix test retries that contain snapshots
jest-mock: Fix incorrect assignments when restoring mocks in instances where they originally didn't exist
expect: Fix stack overflow when matching objects with circular references
jest-haste-map: Workaround a node >=12.5.0 bug that causes the process not to exit after tests have completed and cancerous memory growth
Performance
jest-watcher: Minor optimization for JestHook
@jest/reporters: Prevent runaway CPU useage with
--notifyon macOS
24.8.0
5 May 2019jest-circus: Bind to Circus events via an optional event handler on any custom env
expect: Improve report when matcher fails, part 15
jest-cli: Update
--forceExitand "did not exit for one second" message colors
Features
jest-circus: Bind to Circus events via an optional event handler on any custom env
expect: Improve report when matcher fails, part 15
jest-cli: Update
--forceExitand "did not exit for one second" message colorsexpect: Improve report when matcher fails, part 16
jest-runner: Pass docblock pragmas to TestEnvironment constructor
expect: Improve report when matcher fails, part 17
expect: Improve report when matcher fails, part 18
expect: Improve report when matcher fails, part 19
Fixes
jest-each: Fix bug with placeholder values
jest-snapshot: Inline snapshots: do not indent empty lines
@jest/runtime, @jest/transform: Allow custom transforms for JSON dependencies
jest-core: Make
detectOpenHandlesimplyrunInBandjest-haste-map: Fix the
mapperoption which was incorrectly ignoredjest-jasmine2: Fix describe return value warning being shown if the describe function throws
jest-environment-jsdom: Re-declare global prototype of JSDOMEnvironment
jest-snapshot: Handle arrays when merging snapshots
expect: Extract names of async and generator functions
jest-runtime: Fix virtual mocks not being unmockable after previously being mocked
jest-transform: Replace special characters in transform cache filenames to support Windows
jest-config: Allow exactly one project
Performance
jest-runtime: Fix module registry memory leak
jest-resolve: Optimize resolve module path
jest-resolve: Cache current directory
jest-get-type: Simplify checking for primitive
24.7.1
4 Apr 2019@jest/config: Normalize
testSequencerto its absolute path@jest/console: Print to stderr when calling
console.error,console.warnorconsole.assertusing thejest-runtimeCLI
24.7.0
3 Apr 2019- removed
expect: Remove repetition of matcherName and options in matchers
@jest/core, @jest/test-sequencer: Move
testSequencerto individual package@jest/test-sequencer@jest/core, jest-cli, jest-config: Add option
testSequencerallow user use custom sequencer.
Features
@jest/core, @jest/test-sequencer: Move
testSequencerto individual package@jest/test-sequencer@jest/core, jest-cli, jest-config: Add option
testSequencerallow user use custom sequencer.
Fixes
expect: Add negative equality tests for iterables
jest-haste-map: Resolve fs watcher EMFILE error
Chore & Maintenance
- removed
expect: Remove repetition of matcherName and options in matchers
24.6.0
1 Apr 2019: Improve report when matcher fails, part 13
@jest/core: Filter API pre-filter setup hook
jest-snapshot: Improve report when matcher fails, part 14
Features
: Improve report when matcher fails, part 13
@jest/core: Filter API pre-filter setup hook
jest-snapshot: Improve report when matcher fails, part 14
@jest/reporter: Display todo and skip test descriptions when verbose is true
jest-runner: Support default exports for test environments
pretty-format: Support React.Suspense
jest-snapshot: Indent inline snapshots
jest-config: Support colors in
displayNameconfiguration
Fixes
jest-circus: Fix test retries with beforeAll/beforeEach failures
expect: Fix circular references in iterable equality
jest-changed-files: Change method of obtaining git root
jest-each: Fix test function type
jest-fake-timers:
getTimerCountnot taking immediates and ticks into accountjest-runtime: Allow json file as manual mock
pretty-format: Print
BigIntas a readable number instead of{}jest-core: Fix ability to transform dependencies required from globalSetup script
@jest/reporters: Fix Cannot read property converageData of null
jest-worker:
JEST_WORKER_IDstarts at 1jest-config: Use default cwd even if config contains a cwd property
: Remove internal peer dependencies
: Remove internal peer dependencies
: Remove internal peer dependencies
jest-resolve: Fix requireActual with moduleNameMapper
jest-haste-map: Fix haste map duplicate detection in watch mode
Performance
jest-haste-map: Optimize haste map data structure for serialization/deserialization
jest-haste-map: Avoid persisting haste map or processing files when not changed
jest-core: Improve performance of SearchSource.findMatchingTests by 15%
jest-resolve: Optimize internal cache lookup performance
jest-core: Dramatically improve watch mode performance
jest-transform: Cache regular expression instead of creating anew for every file in ScriptTransformer
jest-core: Fix memory leak of source map info and minor performance improvements
jest-console: Fix memory leak by releasing console output reference when printed to stdout
jest-runtime: Use
Mapinstead ofObjectfor module registry
24.5.0
12 Mar 2019jest-haste-map: Expose
throwOnModuleCollisionviaconfig.haste
Features
jest-haste-map: Expose
throwOnModuleCollisionviaconfig.haste
24.3.0
7 Mar 2019- removed
expect: Remove duck typing and obsolete browser support code when comparing DOM nodes and use DOM-Level-3 API instead
- security
jest-cli: Fix prototype pollution vulnerability in dependency
: Improve report when matcher fails, part 10
We skipped 24.2.0 because a draft was accidentally published. Please use
24.3.0or a newer version instead.Features
: Improve report when matcher fails, part 10
: Improve report when matcher fails, part 11
: Improve report when matcher fails, part 12
: Improve report when matcher fails, part 7
: Improve report when matcher fails, part 8
: Improve report when matcher fails, part 9
jest-circus/jest-jasmine2: Warn if describe returns a value
jest-config: Print error information on preset normalization error
jest-get-type: Add
isPrimitivefunctionjest-haste-map: Add
skipPackageJsonoptionjest-util: Add
isPromisepretty-format: Support
React.memo
Fixes
expect: Fix
toStrictEqualnot considering arrays with objects having undefined values correctlyexpect: Fix custom async matcher stack trace
expect: Fix non-object received value in toHaveProperty (#7986, #8067)
expect: Fix non-symmetric equal for Number
- removed
expect: Remove duck typing and obsolete browser support code when comparing DOM nodes and use DOM-Level-3 API instead
jest-changed-files: Fix
getChangedFilesFromRootsto not return parts of the commit messages as if they were files, when the commit messages contained multiple paragraphsjest-changed-files: Fix pattern for HG changed files
jest-changed-files: Improve default file selection for Mercurial repos
jest-circus: Fix bug with test.only
: Throw explicit error when errors happen after test is considered complete
- security
jest-cli: Fix prototype pollution vulnerability in dependency
jest-cli: Refactor
-oand--coveragecombinedjest-environment-node: Add missing globals: TextEncoder and TextDecoder
jest-haste-map: Enforce uniqueness in names (mocks and haste ids)
: Throw explicit error when errors happen after test is considered complete
jest-mock: Adds a type check to
prototypeto allow mocks of objects with a primitiveprototypeproperty.jest-transform: Normalize config and remove unnecessary checks, convert
TestUtils.jsto TypeScriptMake sure to not fail if unable to assign
toStringTagto theprocessobject, which is read only in Node 12jest-validate: Fix validating async functions
jest-worker: Fix
jest-workerwhen using pre-allocated jobsstatic: Remove console log '-' on the front page
Performance
jest-haste-map: Optimize haste map tracking of deleted files with Watchman.
24.0.0
25 Jan 2019- breaking
jest-each: Add primitive pretty printing for interpolated titles
- breaking
jest-diff: Support diffing numbers and booleans instead of returning null for different ones
- breaking
jest-diff: Replace
diffwithdiff-sequencespackage
Features
- breaking
jest-each: Add primitive pretty printing for interpolated titles
jest-runtime: Add
jest.isolateModulesfor scoped module initialization- breaking
jest-diff: Support diffing numbers and booleans instead of returning null for different ones
- breaking
jest-diff: Replace
diffwithdiff-sequencespackage - breaking
jest-cli: Only set error process error codes when they are non-zero
- breaking
jest-config: Deprecate
setupTestFrameworkScriptFilein favor of newsetupFilesAfterEnv - breaking
jest-worker: Add functionality to call a
setupmethod in the worker before the first call and ateardownmethod when ending the farm - breaking
jest-config: Set default
notifyModetofailure-change - breaking
jest-haste-map: Remove support for
@providesModule - breaking
jest-haste-map: Replace internal data structures to improve performance
- breaking
jest-haste-map: Use relative paths to allow remote caching
- breaking
jest-haste-map: Remove name from hash in
HasteMap.getCacheFilePath - breaking
babel-preset-jest: Export a function instead of an object for Babel 7 compatibility
- breaking
jest-haste-map: Expose relative paths when getting the file iterator
- breaking
jest-cli: Run code transforms over
global{Setup,Teardown} jest-haste-map: Add
hasteFS.getSize(path)jest-cli: Print version ending in
-devwhen running a local Jest clonejest-cli: Add Support for
globalSetupandglobalTeardownin projectsjest-runtime: Add
extraGlobalsto config to load extra global variables into the execution vmjest-util: Export
specialCharscontaining Unicode characters and ANSI escapes for console outputjest-config: Handle typescript (
tsandtsx) by defaultjest-validate: Add support for comments in
package.jsonusing a"//"keyjest-config: Add shorthand for watch plugins and runners
jest-jasmine2/jest-circus/jest-cli: Add test.todo
pretty-format: Option to not escape strings in diff messages
jest-haste-map: Add
getFileIteratortoHasteFSfor faster file iterationjest-config: Add
readConfigsfunction, previously injest-clijest-snapshot: Enable configurable snapshot paths
pretty-format: Support HTMLCollection and NodeList in DOMCollection plugin
jest-runtime: Pass the normalized configuration to script transformers
expect: Improve report when assertion fails, part 3
jest-runtime: If
requirefails without a file extension, print all files that match with onejest-haste-map: Make
ignorePatternoptionaljest-haste-map: Add
getCacheFilePathto get the path to the cache file for aHasteMapinstancejest-runtime: Remove
cacheDirectoryfromignorePatternforHasteMapif not necessaryjest-validate: Add syntax to validate multiple permitted types
jest-config: Accept an array as as well as a string for
testRegex([#7209]#7209))expect/jest-matcher-utils: Improve report when assertion fails, part 4
expect/jest-matcher-utils: Improve report when assertion fails, part 5
expect: Check constructor equality in .toStrictEqual()
jest-util: Add
jest.getTimerCount()to get the count of scheduled fake timersjest-config: Add
dependencyExtractoroption to use a custom module to extract dependencies from files (#7313, #7349, #7350, #7362)jest-haste-map: Accept a
getCacheKeymethod inhasteImplModulePathmodules to reset the cache when the logic changesjest-config: Add
haste.computeSha1option to compute the sha-1 of the files in the haste mapexpect:
expect(Infinity).toBeCloseTo(Infinity)TreatsInfinityas equal in toBeCloseTo matcherjest-worker: Add node worker-thread support to jest-worker
jest-config: Allow
bailsetting to be configured with a number allowing tests to abort afternof failuresjest-config: Allow % based configuration of
--max-workersjest-runner: Instantiate the test environment class with the current
testPathjest-config: Always resolve jest-environment-jsdom from jest-config
expect: Improve report when assertion fails, part 6
jest-worker: Add
enableWorkerThreadsoption to explicitly opt-in toworker_threadsif available
Fixes
expect: Accept inherited properties in
toHavePropertymatcherjest-diff: Do not claim that
-0and0have no visual differencejest-mock: Fix automock for numeric function names
jest-config: Ensure
existsSyncis only called with a string parameterexpect:
toStrictEqualconsiders sparseness of arrays.jest-cli: Fix empty coverage data for untested files
- breaking
jest-cli: Do not use
text-summarycoverage reporter by default if other reporters are configured - breaking
jest-mock: Fix bugs with mock/spy result tracking of recursive functions
- breaking
jest-haste-map: Recover files correctly after haste name collisions are fixed
- breaking
pretty-format: Omit non-enumerable symbol properties
- breaking
*: Upgrade to Babel 7, dropping support for Babel 6
jest-cli: Avoid watch mode causing bad terminal behavior in some cases
jest-runner/jest-worker: Fix missing console output in verbose mode
expect: Standardize file naming in
expectjest-each: Add empty array validation check
jest-cli: Interrupt tests if interactive watch plugin key is pressed
jest-each: Add each array validation check
jest-haste-map: Do not visit again files with the same sha-1
jest-jasmine2: Fix memory leak in Error objects hold by the framework
jest-haste-map: Fixed Haste whitelist generation for scoped modules on Windows
jest-mock: Fix inheritance of static properties and methods in mocks
jest-mock: Fix mocking objects without
Object.prototypein their prototype chainjest-mock: Check
_isMockFunctionis true rather than truthy on potential mocksjest-cli: Update jest-cli to show git ref in message when using
changedSince[jest-jasmine2] Fix crash when test return Promise rejected with nulljest-runtime: Check
_isMockFunctionis true rather than truthy on potential global mocksjest-jasmine: Show proper error message from async
asserterrorsjest-jasmine2: Better error message when a describe block is empty
jest-jasmine2: Pending calls inside async tests are reported as pending not failed
jest-circus: Better error message when a describe block is empty
jest-jasmine2: Add missing testLocationResults for
xitandfitexpect: Return false from asymmetric matchers if received value isn’t string
jest-cli: Fix unhandled error when a bad revision is provided to
changedSincejest-config: Moved dynamically assigned
cwdfromjest-clito default configuration injest-configjest-config: Fix
getMaxWorkerson termuxjest-runtime: Throw an explicit error if
jsis missing frommoduleFileExtensionsjest-runtime: Fix missing coverage when using negative glob pattern in
testMatch*: Ensure
maxWorkersis at least 1 (was 0 in some cases where there was only 1 CPU)jest-runtime: Fix transform cache invalidation when requiring a test file from multiple projects
jest-changed-files: Return correctly the changed files when using
lastCommit=trueon Mercurial repositoriesbabel-jest: Cache includes babel environment variables
jest-config: Use strings instead of
RegExpinstances in normalized configurationjest-circus: Make sure to display real duration even if time is mocked
expect: Improves the failing message for
toStrictEqualmatcher.expect: Improves the failing message for
toEqualmatcher.jest-resolve: Fix not being able to resolve path to mapped file with custom platform
jest-message-util: Improve parsing of error messages for unusually formatted stack traces
jest-runtime: Ensure error message text is not lost on errors with code frames
jest-haste-map: Fix to resolve path that is start with words same as rootDir
expect: Fix toMatchObject matcher when used with
Object.create(null)jest-haste-map: Remove legacy condition for duplicate module detection
jest-haste-map: Fix
requiredetection with trailing commas and ignoreimport typeofmodulesjest-cli: Fix to set prettierPath via config file
expect: Test more precisely for class instance getters
jest-cli: Support dashed args
jest-cli: Fix to run in band tests if watch mode enable when runInBand arg used
jest-runtime: Fix mistake as test files when run coverage issue.
jest-cli: Print info about passWithNoTests flag
pretty-format: Omit unnecessary symbol filter for object keys
jest-runtime: Fix
requireActualon node_modules with mock presentjest-resolve: Fix
isBuiltinModuleto support versions of node withoutmodule.builtinModulesbabel-jest: Set
cwdto be resilient to it changing during the runtime of the testsjest-snapshot: Write and read snapshots from disk even if
fsis mockedjest-config: Normalize
config.cwdandconfig.rootDirusing `realpathjest-environment-node: Fix buffer property is not ArrayBuffer issue.
babel-plugin-jest-hoist: Ignore TS type annotations when looking for out-of-scope references
jest-config: Add name to project if one does not exist to pick correct resolver
jest-runtime: Pass
watchPathIgnorePatternsto Haste instancejest-runtime: Resolve mock files via Haste when using
require.resolve
Chore & Maintenance
- breaking
*: Require Node.js 6+ for all packages
- breaking
jest-util: Remove long-deprecated globals for fake timers
- breaking
*: Upgrade to Micromatch 3
- breaking
*: Remove regenerator-runtime injection
Performance
jest-mock: Improve
getTypefunction performance.
- 23.x
23.4.0
10 Jul 2018jest-haste-map: Add
computeDependenciesflag to avoid opening files if not neededjest-runtime: Support
require.resolve.pathsjest-runtime: Support
pathsoption forrequire.resolve
Features
jest-haste-map: Add
computeDependenciesflag to avoid opening files if not neededjest-runtime: Support
require.resolve.pathsjest-runtime: Support
pathsoption forrequire.resolve
Fixes
jest-runner: Force parallel runs for watch mode, to avoid TTY freeze
jest-cli: Properly reprint resolver errors in watch mode
jest-cli: Write configuration to stdout when the option was explicitly passed to Jest
jest-cli: Fix regression on non-matching suites (6657)
jest-runtime: Roll back
micromatchversion to prevent regression when matching files
23.3.0
4 Jul 2018jest-cli: Allow watch plugin to be configured
jest-snapshot: Introduce
toMatchInlineSnapshotandtoThrowErrorMatchingInlineSnapshotmatchersjest-regex-util: Improve handling already escaped path separators on Windows
Features
jest-cli: Allow watch plugin to be configured
jest-snapshot: Introduce
toMatchInlineSnapshotandtoThrowErrorMatchingInlineSnapshotmatchers
Fixes
jest-regex-util: Improve handling already escaped path separators on Windows
jest-cli: Fix
testNamePatternvalue with interactive snapshotsjest-cli: Fix enter to interrupt watch mode
23.2.0
25 Jun 2018jest-each: Add support for keyPaths in test titles
jest-cli: Add
jest --initoption that generates a basic configuration file with a short description for each optionjest.retryTimes: Add
jest.retryTimes()option that allows failed tests to be retried n-times when using jest-circus.
Features
jest-each: Add support for keyPaths in test titles
jest-cli: Add
jest --initoption that generates a basic configuration file with a short description for each optionjest.retryTimes: Add
jest.retryTimes()option that allows failed tests to be retried n-times when using jest-circus.
Fixes
jest-cli: Add check to make sure one or more tests have run before notifying when using
--notifyjest-cli: Pass
globalConfigas a parameter toglobalSetupandglobalTeardownfunctionsjest-config: Add missing options to the
defaultsobjectexpect: Using symbolic property names in arrays no longer causes the
toEqualmatcher to failexpect:
toEqualno longer tries to compare non-enumerable symbolic properties, to be consistent with non-symbolic properties.jest-util:
console.timeEndnow properly log elapsed time in milliseconds.jest-mock: Fix
MockNativeMethodsaccess in react-nativejest.mock()jest-cli: Fix
reportersformoduleName='default'
23.1.0
30 May 2018jest-each: Add pretty-format serialising to each titles
jest-cli: shouldRunTestSuite watch hook now receives an object with
config,testPathanddurationjest-each: Support one dimensional array of data
Features
jest-each: Add pretty-format serialising to each titles
jest-cli: shouldRunTestSuite watch hook now receives an object with
config,testPathanddurationjest-each: Support one dimensional array of data
jest-watch: Create new package
jest-watchto ease custom watch plugin developmentjest-circus: Make hooks in empty describe blocks error
Add a config/CLI option
errorOnDeprecatedwhich makes calling deprecated APIs throw hepful error messages
Fixes
jest-each: Fix pluralising missing arguments error
jest-each: Stop test title concatenating extra args
expect: toHaveBeenNthCalledWith/nthCalledWith gives wrong call messages if not matched
jest-each: Make sure invalid arguments to
eachpoints back to the user's codeexpect: toMatchObject throws TypeError when a source property is null
jest-cli: Normalize slashes in paths in CLI output on Windows
jest-cli: Fix run beforeAll in excluded suites tests" mode.
[jest-haste-map] Compute SHA-1s for non-tracked files when using Node crawler
23.0.1
27 May 2018pretty-format: Serialize inverse asymmetric matchers correctly
Fixes
pretty-format: Serialize inverse asymmetric matchers correctly
23.0.0
24 May 2018- breaking
jest-snapshot: Concatenate name of test, optional snapshot name and count
- breaking
jest-jasmine2: Adds error throwing and descriptive errors to
it/testfor invalid arguments.[jest-circus]Adds error throwing and descriptive errors toit/testfor invalid arguments - breaking
jest-mock: Include tracked call results in serialized mock
Features
expect: Expose
getObjectSubset,iterableEquality, andsubsetEqualityjest-snapshot: Add snapshot property matchers
jest-config: Support jest-preset.js files within Node modules
jest-cli: Add
--detectOpenHandlesflag which enables Jest to potentially track down handles keeping it open after tests are complete.jest-jasmine2: Add data driven testing based on
jest-eachjest-matcher-utils: Change "suggest to equal" message to be more advisory
jest-message-util: Don't ignore messages with
vendoranymorejest-validate: Get rid of
jest-configdependencyjest-validate: Adds option to inject
deprecationEntries- breaking
jest-snapshot: Concatenate name of test, optional snapshot name and count
jest-runtime: Allow for transform plugins to skip the definition process method if createTransformer method was defined.
expect: Add stack trace for async errors
jest-jasmine2: Add stack trace for timeouts
jest-jasmine2: Add stack trace for thrown non-
Errorsjest-runtime: Prevent modules from marking themselves as their own parent
jest-mock: Add support for auto-mocking generator functions
expect: Add support for async matchers
expect: Suggest toContainEqual
jest-config: Export Jest's default options
jest-editor-support: Move
coveragetoProjectWorkspace.collectCoveragejest-editor-support: Add
coverageoption to runnerjest-haste-map: Support extracting dynamic
importsexpect: Improve output format for mismatchedArgs in mock/spy calls.
jest-cli: Add support for using
--coveragein combination with watch mode,--onlyChanged,--findRelatedTestsand more- breaking
jest-jasmine2: Adds error throwing and descriptive errors to
it/testfor invalid arguments.[jest-circus]Adds error throwing and descriptive errors toit/testfor invalid arguments jest-matcher-utils: Add
isNotoption tomatcherHintfunctionjest-config: Add
<rootDir>to runtime files not found error reportexpect: Make toThrow matcher pass only if Error object is returned from promises
expect: Add isError to utils
expect: Add inverse matchers (
expect.not.arrayContaining, etc., #5517)expect:
expect.extendnow also extends asymmetric matchersjest-mock: Update
spyOnPropertyto support spying on the prototype chainjest-mock: Add tracking of return values in the
mockpropertyjest-mock: Add tracking of thrown errors in the
mockpropertyAdd nthCalledWith spy matcher
jest-cli: Add
isSerialproperty that runners can expose to specify that they can not run in parallelexpect: Add
.toBeCalledTimesandtoHaveBeenNthCalledWithaliasesjest-cli: Interactive Snapshot Mode improvements
jest-editor-support: Add
no-coloroption to runnerjest-jasmine2: Pretty-print non-Error object errors
jest-message-util: Include column in stack frames
expect: Introduce toStrictEqual
expect: Add return matchers
jest-cli: Improve snapshot summaries
expect: Include custom mock names in error messages
jest-diff: Support returning diff from oneline strings
expect: Improve return matchers
jest-cli: Overhaul watch plugin hooks names
- breaking
jest-mock: Include tracked call results in serialized mock
Fixes
jest-cli: Fix stdin encoding to utf8 for watch plugins.
expect: Better detection of DOM Nodes for equality
jest-cli: Fix misleading action description for F key when in "only failed tests" mode.
jest-worker: Stick calls to workers before processing them
babel-plugin-jest-hoist: Allow using
consoleglobal variablejest-jasmine2: Always remove node core message from assert stack traces
expect: Add stack trace when
expect.assertionsandexpect.hasAssertionscauses test failures.jest-runtime: Throw a more useful error when trying to require modules after the test environment is torn down
- breaking
jest-mock: Replace timestamps with
invocationCallOrder jest-jasmine2: Install
sourcemap-supportinto normal runtime to catch runtime errorsjest-jasmine2: Added assertion error handling inside
afterAll hookjest-cli: Remove the notifier actions in case of failure when not in watch mode.
jest-mock: Extend .toHaveBeenCalled return message with outcome
jest-runner: Assign
process.env.JEST_WORKER_ID="1"when in runInBand modejest-cli: Add descriptive error message when trying to use
globalSetup/globalTeardownfile that doesn't export a function.expect: Do not rely on
instanceof RegExp, since it will not work for RegExps created inside of a different VMjest-resolve: Update node module resolution algorithm to correctly handle symlinked paths
jest-editor-support: Update
Settingsto use spawn in shell optionjest-cli: Improve the error message when 2 projects resolve to the same config
jest-runtime: Remove retainLines from coverage instrumentation
jest-cli: Fix update snapshot issue when using watchAll
expect: Fix rejects.not matcher
jest-runtime: Prevent Babel warnings on large files
jest-mock: Prevent
mockRejectedValuefrom causing unhandled rejectionpretty-format: Handle React fragments better
pretty-format: Handle formatting of
React.forwardRefandContextcomponentsjest-cli: Switch collectCoverageFrom back to a string
jest-regex-util: Fix handling regex symbols in tests path on Windows
jest-util: Fix handling of NaN/Infinity in mock timer delay
jest-resolve: Generalise test for package main entries equivalent to ".".
jest-config: Ensure that custom resolvers are used when resolving the configuration
website: Fix website docs
expect: Fix isEqual Set and Map to compare object values and keys regardless of order
- breaking
pretty-format: Remove undefined props from React elements
jest-haste-map: Properly resolve mocked node modules without package.json defined
Chore & Maintenance
- breaking
babel-jest: Always return object from transformer
- breaking
jest-runtime: Remove
jest.genMockFnandjest.genMockFunction
- 22.x
22.4.3
21 Mar 201822.4.1
22 Feb 2018- removed
babel-jest: Remove
retainLinesargument to babel. jest-haste-map: Parallelize Watchman calls in crawler
jest-editor-support: Update TypeScript definitions
Fixes
jest-haste-map: Parallelize Watchman calls in crawler
jest-editor-support: Update TypeScript definitions
- removed
babel-jest: Remove
retainLinesargument to babel.
Features
jest-runtime: Provide
require.mainproperty set to module with test suite
22.4.0
20 Feb 2018- deprecated
jest-runtime: Deprecate mapCoverage option.
jest-haste-map: Overhauls how Watchman crawler works fixing Windows
expect: Allow matching of Errors against plain objects
Fixes
jest-haste-map: Overhauls how Watchman crawler works fixing Windows
expect: Allow matching of Errors against plain objects
jest-haste-map: Do not read binary files in Haste, even when instructed to do so
jest-cli: Don't skip matchers for exact files
jest-runtime: Align handling of testRegex on Windows between searching for tests and instrumentation checks
jest-config: Make it possible to merge
transformoption with presetjest-util: Fix
console.assertbehavior in custom & buffered consoles
Features
- deprecated
jest-runtime: Deprecate mapCoverage option.
babel-jest: Add option to return sourcemap from the transformer separately from source.
jest-validate: Add ability to log deprecation warnings for CLI flags.
jest-serializer: Added new module for serializing. Works using V8 or JSON
22.3.0
13 Feb 2018expect: Add descriptive error message to CalledWith methods when missing optional arguments
jest-cli: Fix inability to quit watch mode while debugger is still attached
jest-haste-map: Properly handle platform-specific file deletions
Fixes
expect: Add descriptive error message to CalledWith methods when missing optional arguments
jest-cli: Fix inability to quit watch mode while debugger is still attached
jest-haste-map: Properly handle platform-specific file deletions
Features
jest-util: Add the following methods to the "console" implementations:
assert,count,countReset,dir,dirxml,group,groupCollapsed,groupEnd,time,timeEndjest-editor-support: Add watchAll flag
jest-cli: Support multiple glob patterns for
collectCoverageFrom
22.2.2
9 Feb 2018babel-jest: Revert "Remove retainLines from babel-jest"
jest-docblock: Support multiple of the same
@pragma.jest-worker: Assign a unique id for each worker and pass it to the child process. It will be available via
process.env.JEST_WORKER_ID
Fixes
babel-jest: Revert "Remove retainLines from babel-jest"
jest-docblock: Support multiple of the same
@pragma.
Features
jest-worker: Assign a unique id for each worker and pass it to the child process. It will be available via
process.env.JEST_WORKER_ID
22.2.0
7 Feb 2018jest-runner: Move test summary to after coverage report
jest-cli: Added
--notifyModeto specify when to be notified.diff-sequences: New package compares items in two sequences to find a longest common subsequence.
Features
jest-runner: Move test summary to after coverage report
jest-cli: Added
--notifyModeto specify when to be notified.diff-sequences: New package compares items in two sequences to find a longest common subsequence.
jest-matcher-utils: Add
commentoption tomatcherHintfunctionjest-config: Allow lastComit and changedFilesWithAncestor via JSON config
jest-util: Add deletion to
process.envas welljest-util: Add case-insensitive getters/setters to
process.envjest-mock: Add util methods to create async functions.
Fixes
jest-cli: Add trailing slash when checking root folder
jest-cli: Hide interactive mode if there are no failed snapshot tests
babel-jest: Remove retainLines from babel-jest
jest-cli: Glob patterns ignore non-
require-able files (e.g.README.md)jest-mock: Add backticks support (``) to
mocka certain package via the__mocks__folder.jest-message-util: Prevent an
ENOENTcrash when the test file contained a malformed source-map. (#5405).jest: Add
import-localtojestpackage.expect: Support class instances in
.toHaveProperty()and.toMatchObjectmatcher.jest-cli: Fix npm update command for snapshot summary. (#5376, 5389)
expect: Make
rejectsandresolvessynchronously validate its argument.jest-resolve: Search required modules in node_modules and then in custom paths.
jest-resolve: Get builtin modules from node core.
jest-resolve: Detect and preserve absolute paths in
moduleDirectories. Do not generate additional (invalid) paths by prepending each ancestor ofcwdto the absolute path. Additionally, this fixes functionality in Windows OS.
22.1.2
17 Jan 2018jest-cli: Check if the file belongs to the checked project before adding it to the list
jest-cli: Fix
EISDIRwhen a directory is passed as an argument tojest.jest-config: Added restoreMocks config option.
22.1.0
15 Jan 2018jest-cli: Make Jest exit without an error when no tests are found in the case of
--lastCommit,--findRelatedTests, or--onlyChangedoptions having been passed to the CLIjest-cli: Add interactive snapshot mode
jest-cli: Use
import-localto support global Jest installations.
Features
jest-cli: Make Jest exit without an error when no tests are found in the case of
--lastCommit,--findRelatedTests, or--onlyChangedoptions having been passed to the CLIjest-cli: Add interactive snapshot mode
Fixes
jest-cli: Use
import-localto support global Jest installations.jest-runner: Fix memory leak in coverage reporting
jest-cli: Fix missing newline in console message
jest-cli:
--lastCommitand--changedFilesWithAncestornow take effect even when--onlyChangedis not specified.
22.0.6
11 Jan 201822.0.5
9 Jan 2018jest-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
stringContainingandstringMatchingmatchers do not match.jest-cli: Treat dumb terminals as noninteractive
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
stringContainingandstringMatchingmatchers do not match.jest-cli: Treat dumb terminals as noninteractive
jest-cli:
jest --onlyChanged --changedFilesWithAncestornow 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
rootDirbefore interpolating withtestMatch.jest-regex-util: Fix breaking change in
--testPathPatternexpect: Do not override
Errorstack (withError.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
describenames.jest-jasmine2: Support generator functions as specs.
jest-jasmine2: Allow
spyOnwith getters and setters.jest-config: Allow configuration objects inside
projectsarrayexpect: Add support to
.toHavePropertymatcher to accept the keyPath argument as an array of properties/indices.jest-runner: Test environments are now passed a new
optionsparameter. Currently this only has theconsolewhich is the test console that Jest will expose to tests.jest-environment-jsdom: Pass the
options.consoleto a custom instance ofvirtualConsoleso jsdom is using the same console as the test.
22.0.4
22 Dec 2017jest-cli: New line before quitting watch mode.
babel-jest: moduleFileExtensions not passed to babel transformer.
Fixes
jest-cli: New line before quitting watch mode.
Features
babel-jest: moduleFileExtensions not passed to babel transformer.
22.0.1
18 Dec 2017jest-runtime: Fix error for test files providing coverage.
jest-config: Add
forceCoverageMatchto allow collecting coverage from ignored files.