diff --git a/CHANGELOG.md b/CHANGELOG.md index ee10b489690f..53f8eea5aae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,81 @@ ## master +## jest 20.0.0 + +* New `--projects` option to run one instance of Jest in multiple projects at the same time. ([#3400](https://github.com/facebook/jest/pull/3400)) +* New multi project runner ([#3156](https://github.com/facebook/jest/pull/3156)) +* New keyboard/arrow selection for watch mode typeaheads. ([#3386](https://github.com/facebook/jest/pull/3386)) +* New --listTests flag. ([#3441](https://github.com/facebook/jest/pull/3441)) +* New --showConfig flag. ([#3296](https://github.com/facebook/jest/pull/3296)) +* New promise support for all `expect` matchers through `.resolves` and `.rejects`. ([#3068](https://github.com/facebook/jest/pull/3068)) +* New `expect.hasAssertions()` function similar to `expect.assertions()`. ([#3379](https://github.com/facebook/jest/pull/3379)) +* New `this.equals` function exposed to custom matchers. ([#3469](https://github.com/facebook/jest/pull/3469)) +* New `valid-expect` lint rule in `eslint-plugin-jest`. ([#3067](https://github.com/facebook/jest/pull/3067)) +* New HtmlElement pretty-format plugin. ([#3230](https://github.com/facebook/jest/pull/3230)) +* New Immutable pretty-format plugins. ([#2899](https://github.com/facebook/jest/pull/2899)) +* New test environment per file setting through `@jest-environment` in the docblock. ([#2859](https://github.com/facebook/jest/pull/2859)) +* New feature that allows every configuration option to be set from the command line. ([#3424](https://github.com/facebook/jest/pull/3424)) +* New feature to add custom reporters to Jest through `reporters` in the configuration. ([#3349](https://github.com/facebook/jest/pull/3349)) +* New feature to add expected and actual values to AssertionError. ([#3217](https://github.com/facebook/jest/pull/3217)) +* New feature to map code coverage from transformers. ([#2290](https://github.com/facebook/jest/pull/2290)) +* New feature to run untested code coverage in parallel. ([#3407](https://github.com/facebook/jest/pull/3407)) +* New option to define a custom resolver. ([#2998](https://github.com/facebook/jest/pull/2998)) +* New printing support for text and comment nodes in html pretty-format. ([#3355](https://github.com/facebook/jest/pull/3355)) +* New snapshot testing FAQ ([#3425](https://github.com/facebook/jest/pull/3425)) +* New support for custom platforms on jest-haste-map. ([#3162](https://github.com/facebook/jest/pull/3162)) +* New support for mocking native async methods. ([#3209](https://github.com/facebook/jest/pull/3209)) +* New guide on how to use Jest with any JavaScript framework. ([#3243](https://github.com/facebook/jest/pull/3243)) +* New translation system for the Jest website. +* Breaking Change: Forked Jasmine 2.5 into Jest's own test runner and rewrote large parts of Jasmine. ([#3147](https://github.com/facebook/jest/pull/3147)) +* Breaking Change: Jest does not write new snapshots by default on CI. ([#3456](https://github.com/facebook/jest/pull/3456)) +* Breaking Change: Moved the typescript parser from `jest-editor-support` into a separate `jest-test-typescript-parser` package. ([#2973](https://github.com/facebook/jest/pull/2973)) +* Breaking Change: Replaced auto-loading of babel-polyfill with only regenerator-runtime, fixes a major memory leak. ([#2755](https://github.com/facebook/jest/pull/2755)) +* Fixed `babel-jest` to look up the `babel` field in `package.json` as a fallback. +* Fixed `jest-editor-support`'s parser to not crash on incomplete ASTs. ([#3259](https://github.com/facebook/jest/pull/3259)) +* Fixed `jest-resolve` to use `is-builtin-module` instead of `resolve.isCore`. ([#2997](https://github.com/facebook/jest/pull/2997)) +* Fixed `jest-snapshot` to normalize line endings in the `serialize` function. ([#3002](https://github.com/facebook/jest/pull/3002)) +* Fixed behavior of `--silent` flag. ([#3003](https://github.com/facebook/jest/pull/3003)) +* Fixed bug with watchers on macOS causing test to crash. ([#2957](https://github.com/facebook/jest/pull/2957)) +* Fixed CLI `notify` option not taking precedence over config option. ([#3340](https://github.com/facebook/jest/pull/3340)) +* Fixed detection of the npm client in SummaryReporter to support Yarn. ([#3263](https://github.com/facebook/jest/pull/3263)) +* Fixed done.fail not passing arguments ([#3241](https://github.com/facebook/jest/pull/3241)) +* Fixed fake timers to restore after resetting mocks. ([#2467](https://github.com/facebook/jest/pull/2467)) +* Fixed handling of babylon's parser options in `jest-editor-support`. ([#3344](https://github.com/facebook/jest/pull/3344)) +* Fixed Jest to properly cache transform results. ([#3334](https://github.com/facebook/jest/pull/3334)) +* Fixed Jest to use human-readable colors for Jest's own snapshots. ([#3119](https://github.com/facebook/jest/pull/3119)) +* Fixed jest-config to use UID for default cache folder. ([#3380](https://github.com/facebook/jest/pull/3380)), ([#3387](https://github.com/facebook/jest/pull/3387)) +* Fixed jest-runtime to expose inner error when it fails to write to the cache. ([#3373](https://github.com/facebook/jest/pull/3373)) +* Fixed lifecycle hooks to make afterAll hooks operate the same as afterEach. ([#3275](https://github.com/facebook/jest/pull/3275)) +* Fixed pretty-format to run plugins before serializing nested basic values. ([#3017](https://github.com/facebook/jest/pull/3017)) +* Fixed return value of mocks so they can explicitly be set to return `undefined`. ([#3354](https://github.com/facebook/jest/pull/3354)) +* Fixed runner to run tests associated with snapshots when the snapshot changes. ([#3025](https://github.com/facebook/jest/pull/3025)) +* Fixed snapshot serializer require, restructured pretty-format. ([#3399](https://github.com/facebook/jest/pull/3399)) +* Fixed spacing in test name pattern typeahead ([#3315](https://github.com/facebook/jest/pull/3315)) +* Fixed support for Babel 7 in babel-jest. ([#3271](https://github.com/facebook/jest/pull/3271)) +* Fixed testMatch to find tests in .folders. ([#3006](https://github.com/facebook/jest/pull/3006)) +* Fixed testNamePattern and testPathPattern to work better together. ([#3327](https://github.com/facebook/jest/pull/3327)) +* Fixed to show reject reason when expecting resolve. ([#3134](https://github.com/facebook/jest/pull/3134)) +* Fixed toHaveProperty() to use hasOwnProperty from Object ([#3410](https://github.com/facebook/jest/pull/3410)) +* Fixed watch mode typeahead filter cursor behavior. ([#3392](https://github.com/facebook/jest/pull/3392)) +* Fixed watch mode usage prompt to collapse after first run. ([#3078](https://github.com/facebook/jest/pull/3078)) +* Fixed watch mode's screen clearing. [(#2959) ([#3294](https://github.com/facebook/jest/pull/3294)) +* Improved and consolidated Jest's configuration file resolution. ([#3472](https://github.com/facebook/jest/pull/3472)) +* Improved documentation throughout the Jest website. +* Improved documentation to explicitly mention that snapshots must be reviewed. ([#3203](https://github.com/facebook/jest/pull/3203)) +* Improved documentation to make it clear CRA users don't need to add dependencies. ([#3312](https://github.com/facebook/jest/pull/3312)) +* Improved eslint-plugin-jest's handling of `expect`. ([#3306](https://github.com/facebook/jest/pull/3306)) +* Improved flow-coverage, eslint rules and test coverage within the Jest repository. +* Improved printing of `expect.assertions` error. ([#3033](https://github.com/facebook/jest/pull/3033)) +* Improved Windows test coverage of Jest. +* Refactored configs & transform ([#3376](https://github.com/facebook/jest/pull/3376)) +* Refactored reporters to pass individual Tests to reporters. ([#3289](https://github.com/facebook/jest/pull/3289)) +* Refactored TestRunner ([#3166](https://github.com/facebook/jest/pull/3166)) +* Refactored watch mode prompts. ([#3290](https://github.com/facebook/jest/pull/3290)) +* Deleted `jest-file-exists`. ([#3105](https://github.com/facebook/jest/pull/3105)) +* Removed `Config` type. ([#3366](https://github.com/facebook/jest/pull/3366)) +* Removed all usage of `jest-file-exists`. ([#3101](https://github.com/facebook/jest/pull/3101)) +* Adopted prettier on the Jest codebase. + ## jest 19.0.1 * Fix infinite loop when using `--watch` with `--coverage`. diff --git a/README.md b/README.md index 164dd1bb0a1c..888b89bf920d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![CircleCI Build Status](https://circleci.com/gh/facebook/jest.svg?style=shield)](https://circleci.com/gh/facebook/jest) [![Travis Build Status](https://travis-ci.org/facebook/jest.svg?branch=master)](https://travis-ci.org/facebook/jest) [![Windows Build Status](https://ci.appveyor.com/api/projects/status/8n38o44k585hhvhd/branch/master?svg=true)](https://ci.appveyor.com/project/Daniel15/jest/branch/master) [![npm version](https://badge.fury.io/js/jest.svg)](http://badge.fury.io/js/jest) -🃏 Painless JavaScript Testing +🃏 Delightful JavaScript Testing - **👩🏻‍💻 Easy Setup**: Jest is a complete and easy to set up JavaScript testing solution. In fact, Jest works out of the box for any React project. @@ -148,7 +148,7 @@ Learn more about using Jest at http://facebook.github.io/jest * [Getting Started](http://facebook.github.io/jest/docs/getting-started.html) * [Guides](http://facebook.github.io/jest/docs/snapshot-testing.html) * [API Reference](http://facebook.github.io/jest/docs/api.html) -* [Configuring package.json](http://facebook.github.io/jest/docs/configuration.html) +* [Configuring Jest](http://facebook.github.io/jest/docs/configuration.html) ## Contributing diff --git a/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md b/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md new file mode 100644 index 000000000000..d8d5fc2bb2fc --- /dev/null +++ b/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md @@ -0,0 +1,88 @@ +--- +title: Jest 20: 💖 Delightful Testing & 🏃🏽 Multi-Project-Runner +author: Christoph Pojer +authorURL: http://twitter.com/cpojer +authorFBID: 100000023028168 +--- + +A few months ago we announced [Jest 19](http://facebook.github.io/jest/blog/2017/02/21/jest-19-immersive-watch-mode-test-platform-improvements.html) which came with major new features and was the biggest Jest release until today. Jest 20 has twice the amount of changes compared to the previous version, features a complete rewrite of the test runner, adds new testing APIs. The new release enables a new level of customization and configuration for projects all while making it effortless to upgrade. Beyond Painless JavaScript Testing, we believe Jest is now delivering a **Delightful JavaScript Testing experience**. Let's take a look at the best new features and changes in depth: + +## Multi-Project-Runner & Configuration Overhaul + +Until now, Jest could only operate in one project at a time. This is often cumbersome if you are working on many smaller projects that each have their own setup and configuration. With Jest 20, we rewrote the test runner completely to run many projects at the same time within a single instance of Jest, for example if you are working on a React frontend and a node.js backend. Here is a video of Jest running tests for [React](https://github.com/facebook/react), [Relay](https://github.com/facebook/relay), [Yarn](https://github.com/yarnpkg/yarn) and Jest all at the same time: + +![multi-runner](/jest/img/blog/20-multi-runner.gif) + + + +Jest is now collapsing the usage guide after the first test run to save vertical space in the terminal. Along with this, we also improved watch mode by adding arrow-key support to the test pattern typeaheads and the test file and test name pattern typeaheads now work together rather than being unrelated features which allow to select the right tests to run more easily: + +![typeahead](/jest/img/blog/20-typeahead.png) + +Further, we completely overhauled how the configuration system works inside of Jest. You can now pass any configuration option through the CLI to overwrite the ones specified in your configuration file. Along with that, we changed Jest to look for a `jest.config.js` file by default which means you are now able to define a Jest configuration using JavaScript as well as being able to configure it through `package.json` like before. Through the addition of all these new features, you are now able to combine Jest in more powerful ways than ever before. For example, if you would like to find out which tests Jest would run given a set of changed files from a commit across multiple projects in a monorepo, you can combine cli arguments like this now: + +``` +$ jest --projects projectA projectB --listTests --findRelatedTests projectA/banana.js projectB/kiwi.js +[ + "projectA/banana.test.js", + "projectB/kiwi.test.js", + "projectB/pineapple.test.js", +] +``` + +This is especially useful for continuous integration (CI) systems where you may want to only run a subset of tests for Pull Requests to prevent Jest from running thousands of test files on every small change. + +Finally, we are now properly mapping code coverage when using TypeScript and we are running code coverage for untested files in worker processes which yields significant speed ups for this feature. + +## New & Improved Testing APIs + +We made a number of additions and improvements to the testing APIs which will help write more effective tests. We'd like to point out that all of these improvements were made entirely by community members! + +* **Better async testing:** Added new async/Promise support through resolves/rejects modifiers on expect: `expect(Promise(…)).resolves.toEqual(…)`. [See documentation](https://facebook.github.io/jest/docs/en/expect.html#resolves). +* **Expect assertions:** Along with the existing `expect.assertions(n)`, the new `expect.hasAssertions()` can be used to ensure a test has at least one assertion. +* **Lint Plugin:** A `valid-expect` rule was added to `eslint-plugin-jest` to ensure that an assertion is called after invoking `expect`. This will prevent mistakes like a stray `expect(banana);` with a missing assertion call. +* **Pretty-Format Plugins:** A number of new pretty-format plugins were added to Jest. We now pretty-print [Immutable.js](https://github.com/facebook/immutable-js/) data structures and HtmlElements in assertion failures and snapshots. +* **Custom Environment:** It is now possible to add a `@jest-environment node|jsdom` annoation to the doc-block comment of a test file to use a test environment different from the default for individual tests. + +Here is an example of all how all the new APIs together will make testing more delightful: + +``` +test('compares apples and bananas', async () => { + expect.hasAssertions(); // Ensure this test has at least one assertion. + + await expect( + Promise.resolve(Immutable.Map({apples: 1, bananas: 2})), + ).resolves.toEqual(Immutable.Map({apples: 1, bananas: 3})); + + expect('banana'); // valid-expect in eslint-plugin-jest will show an error. +}); +``` + +This example will print a test failure similar to this: + +![testing-apis](/jest/img/blog/20-testing-apis.png) + +## Breaking Changes + +As with every major release, we are making a number of breaking changes to make larger changes in the future possible and to push the testing experience to a new level. This time, we tried our best to only break APIs that we don't expect to affect the majority of Jest's users: + +* **Fork of Jasmine 2.5:** We finally decided to fork Jasmine itself and take ownership over Jest's own test runner. This will allow us to improve all aspects of the unit testing experience in the future but for now we are focused on incremental rewrites and reducing the API surface. If you see a test breaking as a result of a Jasmine API that is now missing, there should be an equivalent feature on the `jest` or `expect` objects. As such, we have removed many Jasmine features that aren't generally used in most codebases. +* **New Snapshots on CI:** Snapshots must always be committed along with the test and the modules they are testing. We changed Jest to not save new snapshots automatically in Continuous Integration (CI) environments or when the `--ci` flag is specified. To overwrite this behavior, which is generally not recommended, the `--updateSnapshot` flag can be used. +* **Babel-Polyfill:** Jest used to load `babel-polyfill` automatically when using babel-jest which resulted in memory leaks inside of Jest. In most versions of node, it is not necessary to load `babel-polyfill` so we removed this auto-inclusion and instead changed Jest to only include `regenerator-runtime` by default, which is commonly used to support async/await in older versions of Node.js. If you need `babel-polyfill`, you can manually require it in your setup files. + +## Other Improvements + +* **Documentation:** Documentation is critical to share best practices and teach everyone how to write effective tests which will lead to better software. Over the last few weeks we have also expanded Jest's documentation to include a Snapshot Testing FAQ, a guide with information about how to use Jest with common JavaScript libraries as well as we documented the new features mentioned above. +* **Translations:** We are now asking for your help to [translate the Jest documentation](https://crowdin.com/project/jest) to make it easier for people to learn how to use Jest. +* **Custom Reporters:** Jest now supports custom test reporters through the `reporters` configuration option. You can finally customize the output of Jest as well as integrate it with other tools by generating reports in formats such as XML. [See documentation](https://facebook.github.io/jest/docs/en/configuration.html#reporters-array-modulename-modulename-options). +* **Codebase Health:** It was only possible iterate so quickly in Jest because we spent a significant amount of time on the health of the codebase. We were one of the early adopters of [prettier](https://github.com/prettier/prettier), we increased flow coverage significantly, forked Jasmine to improve our test runner library and we rewrote and refactored significant portions of Jest itself to set up Jest for success in the future. +* **Bugfixes:** As always, we made plenty of bugfixes in Jest. The full Changelog can be found in the [Jest repository](https://github.com/facebook/jest/blob/master/CHANGELOG.md#jest-2000). + +## Talks about Jest + +Recently the Jest core team and other contributors started to talk more about Jest and the experience of working on Jest at conferences: + +* Rogelio Guzman did a talk about [Jest Snapshots and Beyond](https://www.youtube.com/watch?time_continue=416&v=HAuXJVI_bUs) at React Conf. +* I spoke about [Building High-Quality JavaScript Tools](https://developers.facebook.com/videos/f8-2017/building-high-quality-javascript-tools/) at Facebooks f8 conference. + +*As always, this release couldn't have been possible without you, the JavaScript community. We are incredibly grateful that we get the opportunity to work on improving JavaScript testing together. If you'd like to contribute to Jest, please don't hesitate to reach out to us on [GitHub](https://github.com/facebook/jest) or on [Discord](https://discordapp.com/channels/102860784329052160/103622435865104384).* diff --git a/docs/en/Configuration.md b/docs/en/Configuration.md index c751254f4c60..1849b87ff945 100644 --- a/docs/en/Configuration.md +++ b/docs/en/Configuration.md @@ -1,6 +1,6 @@ --- id: configuration -title: Configuring package.json +title: Configuring Jest layout: docs category: API Reference permalink: docs/en/configuration.html @@ -25,6 +25,7 @@ top level so Jest will know how to find your settings: Or through JavaScript: ```js +// jest.config.js module.exports = { verbose: true, }; diff --git a/docs/en/ExpectAPI.md b/docs/en/ExpectAPI.md index 9e8f4bf34ab1..ce66f38983d8 100644 --- a/docs/en/ExpectAPI.md +++ b/docs/en/ExpectAPI.md @@ -300,7 +300,7 @@ If you add a snapshot serializer in individual test files instead of to adding i * You make the dependency explicit instead of implicit. * You avoid limits to configuration that might cause you to eject from [create-react-app](https://github.com/facebookincubator/create-react-app). -See [configuring package.json](/jest/docs/configuration.html#snapshotserializers-array-string) for more information. +See [configuring Jest](/jest/docs/configuration.html#snapshotserializers-array-string) for more information. ### `.not` diff --git a/lerna.json b/lerna.json index 72b0d7b4f683..548abd818423 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "lerna": "2.0.0-rc.4", - "version": "19.0.2", + "version": "20.0.0", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/babel-jest/package.json b/packages/babel-jest/package.json index 94cab6c98f6a..7af3f98c3755 100644 --- a/packages/babel-jest/package.json +++ b/packages/babel-jest/package.json @@ -1,7 +1,7 @@ { "name": "babel-jest", "description": "Jest plugin to use babel for transformation.", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -11,6 +11,6 @@ "dependencies": { "babel-core": "^6.0.0", "babel-plugin-istanbul": "^4.0.0", - "babel-preset-jest": "^19.0.0" + "babel-preset-jest": "^20.0.0" } } diff --git a/packages/babel-plugin-jest-hoist/package.json b/packages/babel-plugin-jest-hoist/package.json index 635f323bc021..18935462b62d 100644 --- a/packages/babel-plugin-jest-hoist/package.json +++ b/packages/babel-plugin-jest-hoist/package.json @@ -1,6 +1,6 @@ { "name": "babel-plugin-jest-hoist", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/babel-preset-jest/package.json b/packages/babel-preset-jest/package.json index 38085419aaf1..5a7d7041925f 100644 --- a/packages/babel-preset-jest/package.json +++ b/packages/babel-preset-jest/package.json @@ -1,6 +1,6 @@ { "name": "babel-preset-jest", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -8,6 +8,6 @@ "license": "BSD-3-Clause", "main": "index.js", "dependencies": { - "babel-plugin-jest-hoist": "^19.0.0" + "babel-plugin-jest-hoist": "^20.0.0" } } diff --git a/packages/eslint-config-fb-strict/package.json b/packages/eslint-config-fb-strict/package.json index 2fd05277b1f8..07753b3499e6 100644 --- a/packages/eslint-config-fb-strict/package.json +++ b/packages/eslint-config-fb-strict/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-fb-strict", - "version": "19.0.1", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -10,7 +10,7 @@ "babel-eslint": "^7.1.1", "eslint-config-fbjs": "^2.0.0-alpha.1", "eslint-plugin-babel": "^4.1.1", - "eslint-plugin-jest": "^19.0.1" + "eslint-plugin-jest": "^20.0.0" }, "peerDependencies": { "eslint": "^3.3.0" diff --git a/packages/eslint-plugin-jest/package.json b/packages/eslint-plugin-jest/package.json index 4f264bcaee80..402fd2490c43 100644 --- a/packages/eslint-plugin-jest/package.json +++ b/packages/eslint-plugin-jest/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-jest", - "version": "19.0.1", + "version": "20.0.0", "description": "Eslint rules for Jest", "keywords": [ "eslint", diff --git a/packages/jest-changed-files/package.json b/packages/jest-changed-files/package.json index 1bd0505fbc51..33c2dba6a996 100644 --- a/packages/jest-changed-files/package.json +++ b/packages/jest-changed-files/package.json @@ -1,6 +1,6 @@ { "name": "jest-changed-files", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/jest-cli/README.md b/packages/jest-cli/README.md index 91dc5675a4f8..8fa409692053 100644 --- a/packages/jest-cli/README.md +++ b/packages/jest-cli/README.md @@ -1,6 +1,6 @@ # Jest -🃏 Painless JavaScript Testing +🃏 Delightful JavaScript Testing - **👩🏻‍💻 Easy Setup**: Jest is a complete and easy to set up JavaScript testing solution. In fact, Jest works out of the box for any React project. diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index c70b37ae69fb..58f5f019a5e6 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -1,7 +1,7 @@ { "name": "jest-cli", - "description": "Painless JavaScript Testing.", - "version": "19.0.2", + "description": "Delightful JavaScript Testing.", + "version": "20.0.0", "main": "build/jest.js", "dependencies": { "ansi-escapes": "^1.4.0", @@ -13,18 +13,18 @@ "istanbul-lib-coverage": "^1.0.1", "istanbul-lib-instrument": "^1.4.2", "istanbul-lib-source-maps": "^1.1.0", - "jest-changed-files": "^19.0.2", - "jest-config": "^19.0.2", - "jest-docblock": "^19.0.2", - "jest-environment-jsdom": "^19.0.2", - "jest-haste-map": "^19.0.0", - "jest-jasmine2": "^19.0.2", - "jest-message-util": "^19.0.0", - "jest-regex-util": "^19.0.0", - "jest-resolve-dependencies": "^19.0.0", - "jest-runtime": "^19.0.2", - "jest-snapshot": "^19.0.2", - "jest-util": "^19.0.2", + "jest-changed-files": "^20.0.0", + "jest-config": "^20.0.0", + "jest-docblock": "^20.0.0", + "jest-environment-jsdom": "^20.0.0", + "jest-haste-map": "^20.0.0", + "jest-jasmine2": "^20.0.0", + "jest-message-util": "^20.0.0", + "jest-regex-util": "^20.0.0", + "jest-resolve-dependencies": "^20.0.0", + "jest-runtime": "^20.0.0", + "jest-snapshot": "^20.0.0", + "jest-util": "^20.0.0", "micromatch": "^2.3.11", "node-notifier": "^5.0.2", "pify": "^2.3.0", diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 1f7fbd5a685d..3d5e362986ad 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -1,6 +1,6 @@ { "name": "jest-config", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -10,12 +10,12 @@ "dependencies": { "chalk": "^1.1.3", "glob": "^7.1.1", - "jest-environment-jsdom": "^19.0.2", - "jest-environment-node": "^19.0.2", - "jest-jasmine2": "^19.0.2", - "jest-regex-util": "^19.0.0", - "jest-resolve": "^19.0.2", - "jest-validate": "^19.0.2", - "pretty-format": "^19.0.0" + "jest-environment-jsdom": "^20.0.0", + "jest-environment-node": "^20.0.0", + "jest-jasmine2": "^20.0.0", + "jest-regex-util": "^20.0.0", + "jest-resolve": "^20.0.0", + "jest-validate": "^20.0.0", + "pretty-format": "^20.0.0" } } diff --git a/packages/jest-diff/package.json b/packages/jest-diff/package.json index 5dbe67e89597..bad76f63189b 100644 --- a/packages/jest-diff/package.json +++ b/packages/jest-diff/package.json @@ -1,6 +1,6 @@ { "name": "jest-diff", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -11,7 +11,7 @@ "dependencies": { "chalk": "^1.1.3", "diff": "^3.2.0", - "jest-matcher-utils": "^19.0.0", - "pretty-format": "^19.0.0" + "jest-matcher-utils": "^20.0.0", + "pretty-format": "^20.0.0" } } diff --git a/packages/jest-docblock/package.json b/packages/jest-docblock/package.json index 9098f8a201ef..75931d460498 100644 --- a/packages/jest-docblock/package.json +++ b/packages/jest-docblock/package.json @@ -1,6 +1,6 @@ { "name": "jest-docblock", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/jest-editor-support/package.json b/packages/jest-editor-support/package.json index 6ef6f37f4153..32548ddca62d 100644 --- a/packages/jest-editor-support/package.json +++ b/packages/jest-editor-support/package.json @@ -1,6 +1,6 @@ { "name": "jest-editor-support", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/jest-environment-jsdom/package.json b/packages/jest-environment-jsdom/package.json index ac115b3cc027..86d9a0a270af 100644 --- a/packages/jest-environment-jsdom/package.json +++ b/packages/jest-environment-jsdom/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-jsdom", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -8,8 +8,8 @@ "license": "BSD-3-Clause", "main": "build/index.js", "dependencies": { - "jest-mock": "^19.0.0", - "jest-util": "^19.0.2", + "jest-mock": "^20.0.0", + "jest-util": "^20.0.0", "jsdom": "^9.12.0" } } diff --git a/packages/jest-environment-node/package.json b/packages/jest-environment-node/package.json index 67fb75aa0c3b..f7517dc79cd7 100644 --- a/packages/jest-environment-node/package.json +++ b/packages/jest-environment-node/package.json @@ -1,6 +1,6 @@ { "name": "jest-environment-node", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -8,7 +8,7 @@ "license": "BSD-3-Clause", "main": "build/index.js", "dependencies": { - "jest-mock": "^19.0.0", - "jest-util": "^19.0.2" + "jest-mock": "^20.0.0", + "jest-util": "^20.0.0" } } diff --git a/packages/jest-haste-map/package.json b/packages/jest-haste-map/package.json index 7f4918badcb1..21729c7a7929 100644 --- a/packages/jest-haste-map/package.json +++ b/packages/jest-haste-map/package.json @@ -1,6 +1,6 @@ { "name": "jest-haste-map", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -10,7 +10,7 @@ "dependencies": { "fb-watchman": "^2.0.0", "graceful-fs": "^4.1.11", - "jest-docblock": "^19.0.2", + "jest-docblock": "^20.0.0", "micromatch": "^2.3.11", "sane": "~1.6.0", "worker-farm": "^1.3.1" diff --git a/packages/jest-jasmine2/package.json b/packages/jest-jasmine2/package.json index a322d5f148b1..32fb6f62aa73 100644 --- a/packages/jest-jasmine2/package.json +++ b/packages/jest-jasmine2/package.json @@ -1,6 +1,6 @@ { "name": "jest-jasmine2", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -10,11 +10,11 @@ "dependencies": { "chalk": "^1.1.3", "graceful-fs": "^4.1.11", - "jest-diff": "^19.0.0", - "jest-matcher-utils": "^19.0.0", - "jest-matchers": "^19.0.0", - "jest-message-util": "^19.0.0", - "jest-snapshot": "^19.0.2", + "jest-diff": "^20.0.0", + "jest-matcher-utils": "^20.0.0", + "jest-matchers": "^20.0.0", + "jest-message-util": "^20.0.0", + "jest-snapshot": "^20.0.0", "once": "^1.4.0", "p-map": "^1.1.1" } diff --git a/packages/jest-matcher-utils/package.json b/packages/jest-matcher-utils/package.json index 5aa231cd9a48..3c4aa6d0a2d1 100644 --- a/packages/jest-matcher-utils/package.json +++ b/packages/jest-matcher-utils/package.json @@ -1,7 +1,7 @@ { "name": "jest-matcher-utils", "description": "A set of utility functions for jest-matchers and related packages", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -11,6 +11,6 @@ "browser": "build-es5/index.js", "dependencies": { "chalk": "^1.1.3", - "pretty-format": "^19.0.0" + "pretty-format": "^20.0.0" } } diff --git a/packages/jest-matchers/package.json b/packages/jest-matchers/package.json index 664f5257222c..73e281a944f0 100644 --- a/packages/jest-matchers/package.json +++ b/packages/jest-matchers/package.json @@ -1,6 +1,6 @@ { "name": "jest-matchers", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -9,9 +9,9 @@ "main": "build/index.js", "browser": "build-es5/index.js", "dependencies": { - "jest-diff": "^19.0.0", - "jest-matcher-utils": "^19.0.0", - "jest-message-util": "^19.0.0", - "jest-regex-util": "^19.0.0" + "jest-diff": "^20.0.0", + "jest-matcher-utils": "^20.0.0", + "jest-message-util": "^20.0.0", + "jest-regex-util": "^20.0.0" } } diff --git a/packages/jest-message-util/package.json b/packages/jest-message-util/package.json index 3076a45371d9..5ac5346a18c3 100644 --- a/packages/jest-message-util/package.json +++ b/packages/jest-message-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-message-util", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/jest-mock/package.json b/packages/jest-mock/package.json index d16d58f6427d..0d3aee64cd59 100644 --- a/packages/jest-mock/package.json +++ b/packages/jest-mock/package.json @@ -1,6 +1,6 @@ { "name": "jest-mock", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/jest-phabricator/package.json b/packages/jest-phabricator/package.json index 7adeb67b86ce..6516056c7cbb 100644 --- a/packages/jest-phabricator/package.json +++ b/packages/jest-phabricator/package.json @@ -1,12 +1,12 @@ { "name": "jest-phabricator", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" }, "dependencies": { - "jest-util": "^19.0.2" + "jest-util": "^20.0.0" }, "license": "BSD-3-Clause", "main": "build/index.js" diff --git a/packages/jest-regex-util/package.json b/packages/jest-regex-util/package.json index 555477e842b6..2ccc7ba90c6b 100644 --- a/packages/jest-regex-util/package.json +++ b/packages/jest-regex-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-regex-util", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/packages/jest-repl/package.json b/packages/jest-repl/package.json index 4f4dd539e6a7..eaf2e9cbf5c5 100644 --- a/packages/jest-repl/package.json +++ b/packages/jest-repl/package.json @@ -1,6 +1,6 @@ { "name": "jest-repl", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -8,8 +8,8 @@ "license": "BSD-3-Clause", "main": "build/index.js", "dependencies": { - "jest-runtime": "^19.0.2", - "jest-util": "^19.0.2", + "jest-runtime": "^20.0.0", + "jest-util": "^20.0.0", "repl": "^0.1.3", "yargs": "^7.0.2" }, diff --git a/packages/jest-resolve-dependencies/package.json b/packages/jest-resolve-dependencies/package.json index d6cbfab9f2a8..1463e7d7c03a 100644 --- a/packages/jest-resolve-dependencies/package.json +++ b/packages/jest-resolve-dependencies/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve-dependencies", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -8,6 +8,6 @@ "license": "BSD-3-Clause", "main": "build/index.js", "dependencies": { - "jest-regex-util": "^19.0.0" + "jest-regex-util": "^20.0.0" } } diff --git a/packages/jest-resolve/package.json b/packages/jest-resolve/package.json index 5a265041b65e..9a82dc824f06 100644 --- a/packages/jest-resolve/package.json +++ b/packages/jest-resolve/package.json @@ -1,6 +1,6 @@ { "name": "jest-resolve", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -13,6 +13,6 @@ "resolve": "^1.3.2" }, "devDependencies": { - "jest-haste-map": "^19.0.0" + "jest-haste-map": "^20.0.0" } } diff --git a/packages/jest-runtime/package.json b/packages/jest-runtime/package.json index 3b059a1e7fbd..dabf64e1dd0f 100644 --- a/packages/jest-runtime/package.json +++ b/packages/jest-runtime/package.json @@ -1,6 +1,6 @@ { "name": "jest-runtime", - "version": "19.0.3", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -9,24 +9,24 @@ "main": "build/index.js", "dependencies": { "babel-core": "^6.0.0", - "babel-jest": "^19.0.0", + "babel-jest": "^20.0.0", "babel-plugin-istanbul": "^4.0.0", "chalk": "^1.1.3", "convert-source-map": "^1.4.0", "graceful-fs": "^4.1.11", - "jest-config": "^19.0.2", - "jest-haste-map": "^19.0.0", - "jest-regex-util": "^19.0.0", - "jest-resolve": "^19.0.2", - "jest-util": "^19.0.2", + "jest-config": "^20.0.0", + "jest-haste-map": "^20.0.0", + "jest-regex-util": "^20.0.0", + "jest-resolve": "^20.0.0", + "jest-util": "^20.0.0", "json-stable-stringify": "^1.0.1", "micromatch": "^2.3.11", "strip-bom": "3.0.0", "yargs": "^7.0.2" }, "devDependencies": { - "jest-environment-jsdom": "^19.0.2", - "jest-environment-node": "^19.0.2" + "jest-environment-jsdom": "^20.0.0", + "jest-environment-node": "^20.0.0" }, "bin": { "jest-runtime": "./bin/jest-runtime.js" diff --git a/packages/jest-snapshot/package.json b/packages/jest-snapshot/package.json index 74e90eef1931..f0f52abe9fd1 100644 --- a/packages/jest-snapshot/package.json +++ b/packages/jest-snapshot/package.json @@ -1,6 +1,6 @@ { "name": "jest-snapshot", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -9,10 +9,10 @@ "main": "build/index.js", "dependencies": { "chalk": "^1.1.3", - "jest-diff": "^19.0.0", - "jest-matcher-utils": "^19.0.0", - "jest-util": "^19.0.2", + "jest-diff": "^20.0.0", + "jest-matcher-utils": "^20.0.0", + "jest-util": "^20.0.0", "natural-compare": "^1.4.0", - "pretty-format": "^19.0.0" + "pretty-format": "^20.0.0" } } diff --git a/packages/jest-test-typescript-parser/package.json b/packages/jest-test-typescript-parser/package.json index dd868d2ee0a9..7a2649dd1e41 100644 --- a/packages/jest-test-typescript-parser/package.json +++ b/packages/jest-test-typescript-parser/package.json @@ -1,6 +1,6 @@ { "name": "jest-test-typescript-parser", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -8,7 +8,7 @@ "license": "BSD-3-Clause", "main": "build/index.js", "dependencies": { - "jest-editor-support": "^19.0.2", + "jest-editor-support": "^20.0.0", "typescript": "^2.2.1" } } diff --git a/packages/jest-util/package.json b/packages/jest-util/package.json index b3743fd11c88..c454fb207ddb 100644 --- a/packages/jest-util/package.json +++ b/packages/jest-util/package.json @@ -1,6 +1,6 @@ { "name": "jest-util", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -11,9 +11,9 @@ "dependencies": { "chalk": "^1.1.3", "graceful-fs": "^4.1.11", - "jest-message-util": "^19.0.0", - "jest-mock": "^19.0.0", - "jest-validate": "^19.0.2", + "jest-message-util": "^20.0.0", + "jest-mock": "^20.0.0", + "jest-validate": "^20.0.0", "leven": "^2.1.0", "mkdirp": "^0.5.1" } diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index 9a38f605c012..7ef97c430ae6 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -1,6 +1,6 @@ { "name": "jest-validate", - "version": "19.0.2", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" @@ -10,8 +10,8 @@ "browser": "build-es5/index.js", "dependencies": { "chalk": "^1.1.3", - "jest-matcher-utils": "^19.0.0", + "jest-matcher-utils": "^20.0.0", "leven": "^2.1.0", - "pretty-format": "^19.0.0" + "pretty-format": "^20.0.0" } } diff --git a/packages/jest/README.md b/packages/jest/README.md index 91dc5675a4f8..8fa409692053 100644 --- a/packages/jest/README.md +++ b/packages/jest/README.md @@ -1,6 +1,6 @@ # Jest -🃏 Painless JavaScript Testing +🃏 Delightful JavaScript Testing - **👩🏻‍💻 Easy Setup**: Jest is a complete and easy to set up JavaScript testing solution. In fact, Jest works out of the box for any React project. diff --git a/packages/jest/package.json b/packages/jest/package.json index b9389c488286..b25c0731a49b 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -1,10 +1,10 @@ { "name": "jest", - "description": "Painless JavaScript Testing.", - "version": "19.0.2", + "description": "Delightful JavaScript Testing.", + "version": "20.0.0", "main": "build/jest.js", "dependencies": { - "jest-cli": "^19.0.2" + "jest-cli": "^20.0.0" }, "bin": { "jest": "./bin/jest.js" diff --git a/packages/pretty-format/package.json b/packages/pretty-format/package.json index 0934046fd8ab..cf75f7b0933a 100644 --- a/packages/pretty-format/package.json +++ b/packages/pretty-format/package.json @@ -1,6 +1,6 @@ { "name": "pretty-format", - "version": "19.0.0", + "version": "20.0.0", "repository": { "type": "git", "url": "https://github.com/facebook/jest.git" diff --git a/website/i18n/en.json b/website/i18n/en.json index 92bd92b38764..cc89539abbe5 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -31,7 +31,7 @@ "title": "Who's using Jest?" }, "watch": { - "content": "The Jest core team and contributors regularly speak about Jest and painless JavaScript Testing. Check out our talks about [Building High-Quality JavaScript Tools](https://developers.facebook.com/videos/f8-2017/building-high-quality-javascript-tools/) at f8 2017 or our talk about [Snapshot Testing](https://www.youtube.com/watch?time_continue=416&v=HAuXJVI_bUs) at React Conf 2017.", + "content": "The Jest core team and contributors regularly speak about Jest and Delightful JavaScript Testing. Check out our talks about [Building High-Quality JavaScript Tools](https://developers.facebook.com/videos/f8-2017/building-high-quality-javascript-tools/) at f8 2017 or our talk about [Snapshot Testing](https://www.youtube.com/watch?time_continue=416&v=HAuXJVI_bUs) at React Conf 2017.", "title": "Watch Talks about Jest" }, "zeroConfig": { @@ -77,7 +77,7 @@ "api": "Globals", "asynchronous": "Testing Asynchronous Code", "cli": "Jest CLI Options", - "configuration": "Configuring package.json", + "configuration": "Configuring Jest", "expect": "Expect", "getting-started": "Getting Started", "jest-object": "The Jest Object", @@ -125,7 +125,7 @@ "title": "Stay up to date" } }, - "tagline": "🃏 Painless JavaScript Testing", + "tagline": "🃏 Delightful JavaScript Testing", "url": "https://facebook.github.io", "using": { "header": { diff --git a/website/src/jest/img/blog/20-multi-runner.gif b/website/src/jest/img/blog/20-multi-runner.gif new file mode 100644 index 000000000000..ef0f4ee3d30c Binary files /dev/null and b/website/src/jest/img/blog/20-multi-runner.gif differ diff --git a/website/src/jest/img/blog/20-testing-apis.png b/website/src/jest/img/blog/20-testing-apis.png new file mode 100644 index 000000000000..c57cf73b0ed4 Binary files /dev/null and b/website/src/jest/img/blog/20-testing-apis.png differ diff --git a/website/src/jest/img/blog/20-typeahead.png b/website/src/jest/img/blog/20-typeahead.png new file mode 100644 index 000000000000..bd21404d1987 Binary files /dev/null and b/website/src/jest/img/blog/20-typeahead.png differ