jest-changed-files
Advanced tools
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 16.0.0
jest <pattern>
is now case-insensitive.it.only
, it.skip
, test.only
, test.skip
and xtest
.--testNamePattern=pattern
or -t <pattern>
to run individual tests in test files.a
, o
, p
, q
or enter
while tests are running in the watch mode, the test run will be interrupted.--bail
now works together with --watch
.test.concurrent
for concurrent async tests..jsx
extension.jest.clearAllMocks
to clear all mocks manually.jest-snapshot
can now be more easily integrated into other test runners and used in other projects.fit
or when an error is thrown in a test.toHaveBeenLastCalledWith
, toHaveBeenCalledWith
, lastCalledWith
and toBeCalledWith
failure messages.toBeInstanceOf
matcher.toContainEqual
matcher.toThrowErrorMatchingSnapshot
matcher.moduleNameMapper
resolution.setupTestFrameworkScriptFile
script to make it easier to use chai together with Jest.--findRelatedTests <fileA> <fileB>
cli option to run tests related to the specified files.jest.deepUnmock
to babel-plugin-jest-hoist
.jest.runTimersToTime
which is useful together with fake timers.Changelog
jest 15.0.0
.spec.js
and .test.js
as test files.--env
option to override the default test environment.--watchAll
, made --watch
interactive and added the ability to update snapshots and select test patterns in watch mode.testEnvironment
resolution to prefer jest-environment-{name}
instead of {name}
only. This prevents a module collision when using jsdom
as test environment.moduleNameMapper
now uses a resolution algorithm.global.global
to the node environment.mock
.collectCoverageFrom
to collect code coverage from untested files.