babel-jest
Advanced tools
Changelog
jest 20.0.0
--projects
option to run one instance of Jest in multiple projects at the same time. (#3400)expect
matchers through .resolves
and .rejects
. (#3068)expect.hasAssertions()
function similar to expect.assertions()
. (#3379)this.equals
function exposed to custom matchers. (#3469)valid-expect
lint rule in eslint-plugin-jest
. (#3067)@jest-environment
in the docblock. (#2859)reporters
in the configuration. (#3349)jest-editor-support
into a separate jest-test-typescript-parser
package. (#2973)babel-jest
to look up the babel
field in package.json
as a fallback.jest-editor-support
's parser to not crash on incomplete ASTs. (#3259)jest-resolve
to use is-builtin-module
instead of resolve.isCore
. (#2997)jest-snapshot
to normalize line endings in the serialize
function. (#3002)--silent
flag. (#3003)notify
option not taking precedence over config option. (#3340)jest-editor-support
. (#3344)undefined
. (#3354)expect
. (#3306)expect.assertions
error. (#3033)jest-file-exists
. (#3105)Config
type. (#3366)jest-file-exists
. (#3101)Changelog
jest 19.0.0
mocksPattern
configuration option, it never worked correctly.testPathDirs
to roots
to avoid confusion when configuring Jest.babel-plugin-jest-hoist
to work properly with type annotations in tests.toMatchObject
.--bail
behavior.babel-jest
plugin: babel is loaded lazily, istanbul comments are only added when coverage is used.--collectCoverageFrom
cli argument.--coverageDirectory
cli argument.expect.addSnapshotSerializer
to add custom snapshot serializers for tests.jest.spyOn
.testMatch
configuration option that accepts glob patterns.__mocks__/react-native/Library/Text.js
will now work as expected.--notify
.Changelog
jest 18.0.0
See https://jestjs.io/blog/2016/12/15/2016-in-jest
pit
and mockImpl
. Use it
or mockImplementation
instead.--bail
is used together with --watch
.pretty-format
is now merged into Jest.require('v8')
now works properly in a test context.expect.any
, expect.anything
, expect.objectContaining
, expect.arrayContaining
, expect.stringMatching
.snapshotSerializers
, setupFiles
, transform
, testRunner
and testResultsProcessor
instead of using path.resolve
.--testResultsProcessor
is now exposed through the cli.--jsonOutputFile
to --outputFile
.jest-editor-support
for vscode and Nuclide integration.test.concurrent
unhandled promise rejections.testRegex
to include test.js
and spec.js
files.babel-plugin-jest-hoist
when using jest.mock
with three arguments.JSON
global in jest-environment-node
now comes from the vm context instead of the parent context.FakeTimers.useTimers()
is called.JEST_HIDE_USAGE
.expect.assertions(number)
which will ensure that a specified amount of assertions is made in one test..toMatchSnapshot(?string)
feature to give snapshots a name.jest-react-native
was deprecated and now forwards react-native
..toMatchObject
matcher.NaN% Failed
in the OS notification when using --notify
..toHaveProperty
matcher.Map
/Set
comparisons.test.concurrent
now works with --testNamePattern
.Changelog
jest 17.0.0
expect.extend
.--expand
(or -e
) to show the full diff.scriptPreprocessor
with the new transform
option.jest.resetAllMocks
which replaces jest.clearAllMocks
.jest-environment-node
..babelrc
is now part of the transform cache key in babel-jest
.jest-haste-map
.--json
now includes information about individual tests inside a file.