Skip to content

Releases: jestjs/jest

22.0.0

16 Aug 10:38
Compare
Choose a tag to compare

Fixes

  • [jest-resolve] Use module.builtinModules as BUILTIN_MODULES when it exists
  • [jest-worker] Remove debug and inspect flags from the arguments sent to the child (#5068)
  • [jest-config] Use all --testPathPattern and <regexForTestFiles> args in testPathPattern (#5066)
  • [jest-cli] Do not support --watch inside non-version-controlled environments (#5060)
  • [jest-config] Escape Windows path separator in testPathPattern CLI arguments (#5054)
  • [jest-jasmine] Register sourcemaps as node environment to improve performance with jsdom (#5045)
  • [pretty-format] Do not call toJSON recursively (#5044)
  • [pretty-format] Fix errors when identity-obj-proxy mocks CSS Modules (#4935)
  • [babel-jest] Fix support for namespaced babel version 7 (#4918)
  • [expect] fix .toThrow for promises (#4884)
  • [jest-docblock] pragmas should preserve urls (#4837)
  • [jest-cli] Check if npm_lifecycle_script calls Jest directly (#4629)
  • [jest-cli] Fix --showConfig to show all configs (#4494)
  • [jest-cli] Throw if maxWorkers doesn't have a value (#4591)
  • [jest-cli] Use fs.realpathSync.native if available (#5031)
  • [jest-config] Fix --passWithNoTests (#4639)
  • [jest-config] Support rootDir tag in testEnvironment (#4579)
  • [jest-editor-support] Fix --showConfig to support jest 20 and jest 21 (#4575)
  • [jest-editor-support] Fix editor support test for node 4 (#4640)
  • [jest-mock] Support mocking constructor in mockImplementationOnce (#4599)
  • [jest-runtime] Fix manual user mocks not working with custom resolver (#4489)
  • [jest-util] Fix runOnlyPendingTimers for setTimeout inside setImmediate (#4608)
  • [jest-message-util] Always remove node internals from stacktraces (#4695)
  • [jest-resolve] changes method of determining builtin modules to include missing builtins (#4740)
  • [pretty-format] Prevent error in pretty-format for window in jsdom test env (#4750)
  • [jest-resolve] Preserve module identity for symlinks (#4761)
  • [jest-config] Include error message for preset json (#4766)
  • [pretty-format] Throw PrettyFormatPluginError if a plugin halts with an exception (#4787)
  • [expect] Keep the stack trace unchanged when PrettyFormatPluginError is thrown by pretty-format (#4787)
  • [jest-environment-jsdom] Fix asynchronous test will fail due to timeout issue. (#4669)
  • [jest-cli] Fix --onlyChanged path case sensitivity on Windows platform (#4730)
  • [jest-runtime] Use realpath to match transformers (#5000)
  • [expect] [BREAKING] Replace identity equality with Object.is in toBe matcher (#4917)

Features

  • [jest-message-util] Add codeframe to test assertion failures (#5087)
  • [jest-config] Add Global Setup/Teardown options (#4716)
  • [jest-config] Add testEnvironmentOptions to apply to jsdom options or node context. (#5003)
  • [jest-jasmine2] Update Timeout error message to jest.timeout and display current timeout value (#4990)
  • [jest-runner] Enable experimental detection of leaked contexts (#4895)
  • [jest-cli] Add combined coverage threshold for directories. (#4885)
  • [jest-mock] Add timestamps to mock state. (#4866)
  • [eslint-plugin-jest] Add prefer-to-have-length lint rule. (#4771)
  • [jest-environment-jsdom] [BREAKING] Upgrade to JSDOM@11 (#4770)
  • [jest-environment-*] [BREAKING] Add Async Test Environment APIs, dispose is now teardown (#4506)
  • [jest-cli] Add an option to clear the cache (#4430)
  • [babel-plugin-jest-hoist] Improve error message, that the second argument of jest.mock must be an inline function (#4593)
  • [jest-snapshot] [BREAKING] Concatenate name of test and snapshot (#4460)
  • [jest-cli] [BREAKING] Fail if no tests are found (#3672)
  • [jest-diff] Highlight only last of odd length leading spaces (#4558)
  • [jest-docblock] Add docblock.print() (#4517)
  • [jest-docblock] Add strip (#4571)
  • [jest-docblock] Preserve leading whitespace in docblock comments (#4576)
  • [jest-docblock] remove leading newlines from parswWithComments().comments (#4610)
  • [jest-editor-support] Add Snapshots metadata (#4570)
  • [jest-editor-support] Adds an 'any' to the typedef for updateFileWithJestStatus (#4636)
  • [jest-editor-support] Better monorepo support (#4572)
  • [jest-environment-jsdom] Add simple rAF polyfill in jsdom environment to work with React 16 (#4568)
  • [jest-environment-node] Implement node Timer api (#4622)
  • [jest-jasmine2] Add testPath to reporter callbacks (#4594)
  • [jest-mock] Added support for naming mocked functions with .mockName(value) and .mockGetName() (#4586)
  • [jest-runtime] Add module.loaded, and make module.require not enumerable (#4623)
  • [jest-runtime] Add module.parent (#4614)
  • [jest-runtime] Support sourcemaps in transformers (#3458)
  • [jest-snapshot] [BREAKING] Add a serializer for jest.fn to allow a snapshot of a jest mock (#4668)
  • [jest-worker] Initial version of parallel worker abstraction, say hello! (#4497)
  • [jest-jasmine2] Add testLocationInResults flag to add location information per spec to test results (#4782)
  • [jest-environment-jsdom] Update JSOM to 11.4, which includes built-in support for requestAnimationFrame (#4919)
  • [jest-cli] Hide watch usage output when running on non-interactive environments (#4958)
  • [jest-snapshot] Promises support for toThrowErrorMatchingSnapshot (#4946)
  • [jest-cli] Explain which snapshots are obsolete (#5005)

Chore & Maintenance

  • [docs] Add guide of using with puppeteer (#5093)
  • [jest-util] jest-util should not depend on jest-mock (#4992)
  • [*] [BREAKING] Drop support for Node.js version 4 (#4769)
  • [docs] Wrap code comments at 80 characters (#4781)
  • [eslint-plugin-jest] Removed from the Jest core repo, and moved to https://github.com/jest-community/eslint-plugin-jest (#4867)
  • [babel-jest] Explicitly bump istanbul to newer versions (#4616)
  • [expect] Upgrade mocha and rollup for browser testing (#4642)
  • [docs] Add info about coveragePathIgnorePatterns (#4602)
  • [docs] Add Vuejs series of testing with Jest (#4648)
  • [docs] Mention about optional done argument in test function (#4556)
  • [jest-cli] Bump node-notifier version (#4609)
  • [jest-diff] Simplify highlight for leading and trailing spaces ([#4553](https://github.com/face...
Read more

21.2.1

16 Aug 10:38
Compare
Choose a tag to compare
  • Fix watchAll not running tests on save (#4550)
  • Add missing escape sequences to ConvertAnsi plugin (#4544)

21.2.0

16 Aug 10:38
Compare
Choose a tag to compare
  • 🃏 Change license from BSD+Patents to MIT.
  • Allow eslint-plugin to recognize more disabled tests (#4533)
  • Add babel-plugin for object spread syntax to babel-preset-jest (#4519)
  • Display outer element and trailing newline consistently in jest-diff (#4520)
  • Do not modify stack trace of JestAssertionError (#4516)
  • Print errors after test structure in verbose mode (#4504)
  • Fix --silent --verbose problem (#4505)
  • Fix: Reset local state of assertions when using hasAssertions (#4498)
  • jest-resolve: Prevent default resolver failure when potential resolution directory does not exist (#4483)

21.1.0

16 Aug 10:38
Compare
Choose a tag to compare
  • (minor) Use ES module exports (#4454)
  • Allow chaining mockClear and mockReset (#4475)
  • Call jest-diff and pretty-format more precisely in toHaveProperty matcher (#4445)
  • Expose restoreAllMocks to object (#4463)
  • Fix function name cleaning when making mock fn (#4464)
  • Fix Map/Set equality checker (#4404)
  • Make FUNCTION_NAME_RESERVED_PATTERN stateless (#4466)

21.0.2

16 Aug 10:38
Compare
Choose a tag to compare
  • Take precedence of NODE_PATH when resolving node_modules directories (#4453)
  • Fix race condition with --coverage and babel-jest identical file contents edge case (#4432)
  • Add extra parameter --runTestsByPath. (#4411)
  • Upgrade all outdated deps (#4425)

21.0.1

16 Aug 10:38
Compare
Choose a tag to compare
  • Remove obsolete error (#4417)

21.0.0

16 Aug 10:38
Compare
Choose a tag to compare
  • Add --changedFilesWithAncestor (#4070)

  • Add --findRelatedFiles (#4131)

  • Add --onlyChanged tests (#3977)

  • Add contextLines option to jest-diff (#4152)

  • Add alternative serialize API for pretty-format plugins (#4114)

  • Add displayName to MPR (#4327)

  • Add displayName to TestResult (#4408)

  • Add es5 build of pretty-format (#4075)

  • Add extra info to no tests for changed files message (#4188)

  • Add fake chalk in browser builds in order to support IE10 (#4367)

  • Add jest.requireActual (#4260)

  • Add maxWorkers to globalConfig (#4005)

  • Add skipped tests support for jest-editor-support (#4346)

  • Add source map support for better debugging experience (#3738)

  • Add support for Error objects in toMatchObject (#4339)

  • Add support for Immutable.Record in pretty-format (#3678)

  • Add tests for extract_requires on export types (#4080)

  • Add that toMatchObject can match arrays (#3994)

  • Add watchPathIgnorePatterns to exclude paths to trigger test re-run in watch mode (#4331)

  • Adding ancestorTitles property to JSON test output (#4293)

  • Allow custom resolver to be used with[out] moduleNameMapper (#4174)

  • Avoid parsing .require(…) method calls (#3777)

  • Avoid unnecessary function declarations and call in pretty-format (#3962)

  • Avoid writing to stdout in default reporter if --json is enabled. Fixes #3941 (#3945)

  • Better error handling for --config (#4230)

  • Call consistent pretty-format plugins within Jest (#3800)

  • Change babel-core to peerDependency for compatibility with Babel 7 (#4162)

  • Change Promise detection code in jest-circus to support non-global Promise implementations (#4375)

  • Changed files eager loading (#3979)

  • Check whether we should output to stdout or stderr (#3953)

  • Clarify what objects toContain and toContainEqual can be used on (#4307)

  • Clean up resolve() logic. Provide useful names for variables and functions. Test that a directory exists before attempting to resolve files within it. (#4325)

  • cleanupStackTrace (#3696)

  • compare objects with Symbol keys (#3437)

  • Complain if expect is passed multiple arguments (#4237)

  • Completes nodeCrawl with empty roots (#3776)

  • Consistent naming of files (#3798)

  • Convert code base to ESM import (#3778)

  • Correct summary message for flag --findRelatedTests. (#4309)

  • Coverage thresholds can be set up for individual files (#4185)

  • custom reporter error handling (#4051)

  • Define separate type for pretty-format plugin Options (#3802)

  • Delete confusing async keyword (#3679)

  • Delete redundant branch in ReactElement and HTMLElement plugins (#3731)

  • Don't format node assert errors when there's no 'assert' module (#4376)

  • Don't print test summary in --silent (#4106)

  • Don't try to build ghost packages (#3934)

  • Escape double quotes in attribute values in HTMLElement plugin (#3797)

  • Explain how to clear the cache (#4232)

  • Factor out common code for collections in pretty-format (#4184)

  • Factor out common code for markup in React plugins (#4171)

  • Feature/internal resolve (#4315)

  • Fix --logHeapUsage (#4176)

  • Fix --showConfig to show all project configs (#4078)

  • Fix --watchAll (#4254)

  • Fix bug when setTimeout is mocked (#3769)

  • Fix changedFilesWithAncestor (#4193)

  • Fix colors for expected/stored snapshot message (#3702)

  • Fix concurrent test failure (#4159)

  • Fix for 4286: Compare Maps and Sets by value rather than order (#4303)

  • fix forceExit (#4105)

  • Fix grammar in React Native docs (#3838)

  • Fix inconsistent name of complex values in pretty-format (#4001)

  • Fix issue mocking bound method (#3805)

  • Fix jest-circus (#4290)

  • Fix lint warning in master

    (#4132)

  • Fix linting (#3946)

  • fix merge conflict (#4144)

  • Fix minor typo (#3729)

  • fix missing console.log messages (#3895)

  • fix mock return value (#3933)

  • Fix mocking for modules with folders on windows (#4238)

  • Fix NODE_PATH resolving for relative paths (#3616)

  • Fix options.moduleNameMapper override order with preset (#3565 (#3689)

  • Fix React PropTypes warning in tests for Immutable plugin (#4412)

  • Fix regression in mockReturnValueOnce (#3857)

  • Fix sample code of mock class constructors (#4115)

  • Fix setup-test-framework-test (#3773)

  • fix typescript jest test crash (#4363)

  • Fix watch mode (#4084)

  • Fix Watchman on windows (#4018)

  • Fix(babel): Handle ignored files in babel v7 (#4393)

  • Fix(babel): Support upcoming beta (#4403)

  • Fixed object matcher (#3799)

  • Fixes #3820 use extractExpectedAssertionsErrors in jasmine setup

  • Flow upgrade (#4355)

  • Force message in matchers to always be a function (#3972)

  • Format describe and use test instead of it alias (#3792)

  • global_config.js for multi-project runner (#4023)

  • Handle async errors (#4016)

  • Hard-fail if hasteImpl is throwing an error during initialization. (#3812)

  • Ignore import type for extract_requires (#4079)

  • Ignore indentation of data structures in jest-diff (#3429)

  • Implement 'jest.requireMock' (#4292)

  • Improve Jest phabricator plugin (#4195)

  • Improve Seq and remove newline from non-min empty in Immutable plugin (#4241)

  • Improved the jest reporter with snapshot info per test. (#3660)

  • Include fullName in formattedAssertion (#4273)

  • Integrated with Yarn workspaces (#3906)

  • jest --all (#4020)

  • jest-circus test failures (#3770)

  • jest-circus Timeouts (#3760)

  • jest-haste-map: add test case for broken han...

Read more

20.0.4

16 Aug 10:38
Compare
Choose a tag to compare
  • Fix jest-haste-map's handling of duplicate module IDs. (#3647)
  • Fix behavior of enableAutomock() when automock is set to false. (#3624)
  • Fix progress bar in windows. (#3626)

20.0.3

16 Aug 10:38
Compare
Choose a tag to compare
  • Fix reporters 'default' setting. (#3562)
  • Fix to make Jest fail when the coverage threshold not met. (#3554)

20.0.1

16 Aug 10:38
Compare
Choose a tag to compare
  • Add ansi-regex to pretty-format dependencies (#3498)
  • Fix replacement in testMatch and moduleDirectories (#3538)
  • Fix expect.hasAssertions() to throw when passed arguments (#3526)
  • Fix stack traces without proper error messages (#3513)
  • Fix support for custom extensions through haste packages (#3537)
  • Fix test contexts between test functions (#3506)