diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 4b67d9b3684a..05dca9039446 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -12,6 +12,6 @@ about: If you have questions, please check our Discord or StackOverflow For questions or help please see: -- [The Jest help page](https://facebook.github.io/jest/en/help.html) +- [The Jest help page](https://jestjs.io/en/help.html) - [Our discord channel in Reactiflux](https://discord.gg/MWRhKCj) - The [jestjs](https://stackoverflow.com/questions/tagged/jestjs) tag on [StackOverflow](https://stackoverflow.com/questions/ask) diff --git a/CHANGELOG.md b/CHANGELOG.md index 009903b186cb..1755a44ac9c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - `[website]` Switch domain to https://jestjs.io ([#6549](https://github.com/facebook/jest/pull/6549)) - `[tests]` Improve stability of `yarn test` on Windows ([#6534](https://github.com/facebook/jest/pull/6534)) - `[*]` Transpile object shorthand into Node 4 compatible syntax ([#6582](https://github.com/facebook/jest/pull/6582)) +- `[*]` Update all legacy links to jestjs.io ([#6622](https://github.com/facebook/jest/pull/6622)) ## 23.2.0 @@ -921,7 +922,7 @@ ## jest 18.0.0 -See https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html +See https://jestjs.io/blog/2016/12/15/2016-in-jest.html - The testResultsProcessor function is now required to return the modified results. - Removed `pit` and `mockImpl`. Use `it` or `mockImplementation` instead. @@ -1058,7 +1059,7 @@ See https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html ## jest 15.0.0 -- See https://facebook.github.io/jest/blog/2016/09/01/jest-15.html +- See https://jestjs.io/blog/2016/09/01/jest-15.html - Jest by default now also recognizes files ending in `.spec.js` and `.test.js` as test files. - Completely replaced most Jasmine matchers with new Jest matchers. - Rewrote Jest's CLI output for test failures and summaries. @@ -1152,7 +1153,7 @@ See https://facebook.github.io/jest/blog/2016/12/15/2016-in-jest.html - Added `jest-resolve` as a standalone package based on the Facebook module resolution algorithm. - Added `jest-changed-files` as a standalone package to detect changed files in a git or hg repo. - Added `--setupTestFrameworkFile` to cli. -- Added support for coverage thresholds. See http://facebook.github.io/jest/docs/api.html#coveragethreshold-object. +- Added support for coverage thresholds. See https://jestjs.io/docs/en/configuration#coveragethreshold-object. - Updated to jsdom 9.0. - Updated and improved stack trace reporting. - Added `module.filename` and removed the invalid `module.__filename` field. diff --git a/docs/Configuration.md b/docs/Configuration.md index ad0f522aa56f..7266c12c6791 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -884,7 +884,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/docs/ExpectAPI.md b/docs/ExpectAPI.md index 7cd3c1abde86..c691a1294f24 100644 --- a/docs/ExpectAPI.md +++ b/docs/ExpectAPI.md @@ -1139,7 +1139,7 @@ And it will generate the following snapshot: exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`; ``` -Check out [React Tree Snapshot Testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html) for more information on snapshot testing. +Check out [React Tree Snapshot Testing](https://jestjs.io/blog/2016/07/27/jest-14.html) for more information on snapshot testing. ### `.toThrowErrorMatchingInlineSnapshot()` diff --git a/docs/MoreResources.md b/docs/MoreResources.md index 183c76204b28..1e273085b055 100644 --- a/docs/MoreResources.md +++ b/docs/MoreResources.md @@ -21,4 +21,4 @@ You will find a number of example test cases in the [`examples`](https://github. Ask questions and find answers from other Jest users like you. [Reactiflux](http://www.reactiflux.com/) is a Discord chat where a lot of Jest discussion happens. Check out the [#jest](https://discord.gg/MWRhKCj) channel. -Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/jest/blog/) to find out what's happening in the world of Jest. +Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/blog/) to find out what's happening in the world of Jest. diff --git a/docs/SnapshotTesting.md b/docs/SnapshotTesting.md index dedfe5ea996a..9b79f7035548 100644 --- a/docs/SnapshotTesting.md +++ b/docs/SnapshotTesting.md @@ -41,7 +41,7 @@ exports[`renders correctly 1`] = ` The snapshot artifact should be committed alongside code changes, and reviewed as part of your code review process. Jest uses [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the test runner found a bug in your code that should be fixed, or the implementation has changed and the snapshot needs to be updated. -More information on how snapshot testing works and why we built it can be found on the [release blog post](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. +More information on how snapshot testing works and why we built it can be found on the [release blog post](https://jestjs.io/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. ### Updating Snapshots @@ -269,7 +269,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover ### What's the difference between snapshot testing and visual regression testing? -Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html#why-snapshot-testing). +Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](https://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). ### Does snapshot testing substitute unit testing? diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md index 3421eb006944..e22d209dc0b7 100644 --- a/docs/Troubleshooting.md +++ b/docs/Troubleshooting.md @@ -184,7 +184,7 @@ yarn test --maxWorkers=4 ## Compatibility issues -Jest takes advantage of new features added to Node 6. We recommend that you upgrade to the latest stable release of Node. The minimum supported version is `v6.0.0`. Versions `0.x.x` and `4.x.x` are not supported because the `jsdom` version used in Jest doesn't support Node 4. However, if you need to run Jest on Node 4, you can use the `testEnvironment` config to use a [custom environment](https://facebook.github.io/jest/docs/en/configuration.html#testenvironment-string) that supports Node 4, such as [`jest-environment-node`](https://yarnpkg.com/en/package/jest-environment-node). +Jest takes advantage of new features added to Node 6. We recommend that you upgrade to the latest stable release of Node. The minimum supported version is `v6.0.0`. Versions `0.x.x` and `4.x.x` are not supported because the `jsdom` version used in Jest doesn't support Node 4. However, if you need to run Jest on Node 4, you can use the `testEnvironment` config to use a [custom environment](https://jestjs.io/docs/en/configuration.html#testenvironment-string) that supports Node 4, such as [`jest-environment-node`](https://yarnpkg.com/en/package/jest-environment-node). ## `coveragePathIgnorePatterns` seems to not have any effect. @@ -192,4 +192,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html). diff --git a/e2e/__tests__/__snapshots__/custom_reporters.test.js.snap b/e2e/__tests__/__snapshots__/custom_reporters.test.js.snap index 43599439fc43..c1832808c3f4 100644 --- a/e2e/__tests__/__snapshots__/custom_reporters.test.js.snap +++ b/e2e/__tests__/__snapshots__/custom_reporters.test.js.snap @@ -117,7 +117,7 @@ exports[`Custom Reporters Integration invalid format for adding reporters 1`] = ] Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html " `; diff --git a/e2e/__tests__/deprecated_cli_options.test.js b/e2e/__tests__/deprecated_cli_options.test.js index 4284af8710a4..102f4d5b3d03 100644 --- a/e2e/__tests__/deprecated_cli_options.test.js +++ b/e2e/__tests__/deprecated_cli_options.test.js @@ -25,5 +25,5 @@ it('Prints deprecation warnings for CLI flags', () => { Please update your configuration. CLI Options Documentation: - https://facebook.github.io/jest/docs/en/cli.html`); + https://jestjs.io/docs/en/cli.html`); }); diff --git a/packages/babel-jest/README.md b/packages/babel-jest/README.md index ad94798193e7..9284fecd12fc 100644 --- a/packages/babel-jest/README.md +++ b/packages/babel-jest/README.md @@ -16,7 +16,7 @@ yarn add --dev babel-jest babel-core > yarn add --dev babel-jest babel-core@^7.0.0-0 @babel/core > ``` -If you would like to write your own preprocessor, uninstall and delete babel-jest and set the [config.transform](http://facebook.github.io/jest/docs/configuration.html#transform-object-string-string) option to your preprocessor. +If you would like to write your own preprocessor, uninstall and delete babel-jest and set the [config.transform](https://jestjs.io/docs/configuration#transform-object-string-string) option to your preprocessor. ## Setup diff --git a/packages/expect/README.md b/packages/expect/README.md index 7bc0026b6a18..2841a1e78670 100644 --- a/packages/expect/README.md +++ b/packages/expect/README.md @@ -1,3 +1,3 @@ # expect -This package exports the `expect` function used in [Jest](https://facebook.github.io/jest/). You can find its documentation [on Jest's website](https://facebook.github.io/jest/docs/en/expect.html). +This package exports the `expect` function used in [Jest](https://jestjs.io/). You can find its documentation [on Jest's website](https://jestjs.io/docs/en/expect.html). diff --git a/packages/jest-changed-files/README.md b/packages/jest-changed-files/README.md index 1911bfcd5ea2..795ebe7398cc 100644 --- a/packages/jest-changed-files/README.md +++ b/packages/jest-changed-files/README.md @@ -16,7 +16,7 @@ Get the list of files and repos that have changed since the last commit. #### Parameters -roots: Array of string paths gathered from [jest roots](https://facebook.github.io/jest/docs/configuration.html#roots-array-string). +roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration.html#roots-array-string). options: Object literal with keys @@ -29,7 +29,7 @@ Get a set of git and hg repositories. #### Parameters -roots: Array of string paths gathered from [jest roots](https://facebook.github.io/jest/docs/configuration.html#roots-array-string). +roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration.html#roots-array-string). ## Usage diff --git a/packages/jest-cli/README.md b/packages/jest-cli/README.md index 8213f3605bf1..4e02089b45ac 100644 --- a/packages/jest-cli/README.md +++ b/packages/jest-cli/README.md @@ -6,6 +6,6 @@ - **🏃🏽 Instant Feedback**: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files. -- **📸 Snapshot Testing**: Jest can [capture snapshots](http://facebook.github.io/jest/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing. +- **📸 Snapshot Testing**: Jest can [capture snapshots](https://jestjs.io/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing. -Read More: http://facebook.github.io/jest/ +Read More: https://jestjs.io/ diff --git a/packages/jest-cli/package.json b/packages/jest-cli/package.json index cc4bf5584f89..15e1d8dd29de 100644 --- a/packages/jest-cli/package.json +++ b/packages/jest-cli/package.json @@ -54,7 +54,7 @@ "bugs": { "url": "https://github.com/facebook/jest/issues" }, - "homepage": "http://jestjs.io/", + "homepage": "https://jestjs.io/", "license": "MIT", "keywords": [ "ava", diff --git a/packages/jest-cli/src/cli/args.js b/packages/jest-cli/src/cli/args.js index b47dccc5306d..4b8b970bc578 100644 --- a/packages/jest-cli/src/cli/args.js +++ b/packages/jest-cli/src/cli/args.js @@ -67,7 +67,7 @@ export const check = (argv: Argv) => { export const usage = 'Usage: $0 [--config=] [TestPathPattern]'; -export const docs = 'Documentation: https://facebook.github.io/jest/'; +export const docs = 'Documentation: https://jestjs.io/'; export const options = { all: { diff --git a/packages/jest-cli/src/lib/__tests__/__snapshots__/init.test.js.snap b/packages/jest-cli/src/lib/__tests__/__snapshots__/init.test.js.snap index 9b76d05c3803..8123bb5ac5d1 100644 --- a/packages/jest-cli/src/lib/__tests__/__snapshots__/init.test.js.snap +++ b/packages/jest-cli/src/lib/__tests__/__snapshots__/init.test.js.snap @@ -20,7 +20,7 @@ Object { exports[`init project with package.json and no jest config all questions answered with answer: "No" should return the default configuration (an empty config) 1`] = ` "// For a detailed explanation regarding each configuration property, visit: -// https://facebook.github.io/jest/docs/en/configuration.html +// https://jestjs.io/docs/en/configuration.html module.exports = { // All imported modules in your tests should be mocked automatically diff --git a/packages/jest-cli/src/lib/init/generate_config_file.js b/packages/jest-cli/src/lib/init/generate_config_file.js index f232095fff23..db0cc819fe40 100644 --- a/packages/jest-cli/src/lib/init/generate_config_file.js +++ b/packages/jest-cli/src/lib/init/generate_config_file.js @@ -84,7 +84,7 @@ const generateConfigFile = (results: {[string]: boolean}): string => { return ( '// For a detailed explanation regarding each configuration property, visit:\n' + - '// https://facebook.github.io/jest/docs/en/configuration.html\n\n' + + '// https://jestjs.io/docs/en/configuration.html\n\n' + 'module.exports = {\n' + properties.join('\n') + '};\n' diff --git a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap index 4acf2575baa6..fa69c6b9f479 100644 --- a/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap +++ b/packages/jest-config/src/__tests__/__snapshots__/normalize.test.js.snap @@ -13,7 +13,7 @@ exports[`Upgrade help logs a warning when \`scriptPreprocessor\` and/or \`prepro Please update your configuration. Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html " `; @@ -23,7 +23,7 @@ exports[`preset throws when preset not found 1`] = ` Preset doesnt-exist not found. Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html " `; @@ -33,7 +33,7 @@ exports[`rootDir throws if the options is missing a rootDir property 1`] = ` Configuration option rootDir must be specified. Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html " `; @@ -43,7 +43,7 @@ exports[`testEnvironment throws on invalid environment names 1`] = ` Test environment phantom cannot be found. Make sure the testEnvironment configuration option points to an existing node module. Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html " `; @@ -53,7 +53,7 @@ exports[`testMatch throws if testRegex and testMatch are both specified 1`] = ` Configuration options testMatch and testRegex cannot be used together. Configuration Documentation: - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html " `; diff --git a/packages/jest-config/src/utils.js b/packages/jest-config/src/utils.js index e36eb47d4686..fb4aae572ae1 100644 --- a/packages/jest-config/src/utils.js +++ b/packages/jest-config/src/utils.js @@ -25,7 +25,7 @@ export const BULLET: string = chalk.bold('\u25cf '); export const DOCUMENTATION_NOTE = ` ${chalk.bold( 'Configuration Documentation:', )} - https://facebook.github.io/jest/docs/configuration.html + https://jestjs.io/docs/configuration.html `; const createValidationError = (message: string) => diff --git a/packages/jest-each/README.md b/packages/jest-each/README.md index 867586f36c76..7df07bb751bb 100644 --- a/packages/jest-each/README.md +++ b/packages/jest-each/README.md @@ -7,7 +7,7 @@ [![version](https://img.shields.io/npm/v/jest-each.svg?style=flat-square)](https://www.npmjs.com/package/jest-each) [![downloads](https://img.shields.io/npm/dm/jest-each.svg?style=flat-square)](http://npm-stat.com/charts.html?package=jest-each&from=2017-03-21) [![MIT License](https://img.shields.io/npm/l/jest-each.svg?style=flat-square)](https://github.com/facebook/jest/blob/master/LICENSE) -A parameterised testing library for [Jest](https://facebook.github.io/jest/) inspired by [mocha-each](https://github.com/ryym/mocha-each). +A parameterised testing library for [Jest](https://jestjs.io/) inspired by [mocha-each](https://github.com/ryym/mocha-each). jest-each allows you to provide multiple arguments to your `test`/`describe` which results in the test/suite being run once per row of parameters. diff --git a/packages/jest-editor-support/src/Settings.js b/packages/jest-editor-support/src/Settings.js index cbaddb7b985e..d9cac96c91a4 100644 --- a/packages/jest-editor-support/src/Settings.js +++ b/packages/jest-editor-support/src/Settings.js @@ -20,7 +20,7 @@ import {createProcess} from './Process'; // settings object will be in memory. // Ideally anything you care about adding should have a default in -// the constructor see https://facebook.github.io/jest/docs/configuration.html +// the constructor see https://jestjs.io/docs/configuration.html // for full deets // For now, this is all we care about inside the config diff --git a/packages/jest-runtime/src/helpers.js b/packages/jest-runtime/src/helpers.js index f2000155f494..cd213528093c 100644 --- a/packages/jest-runtime/src/helpers.js +++ b/packages/jest-runtime/src/helpers.js @@ -22,7 +22,7 @@ ${DOT}If you simply want to mock your non-JS modules (e.g. binary assets) you ca )} config option. You'll find more details and examples of these config options in the docs: -${chalk.cyan('https://facebook.github.io/jest/docs/en/configuration.html')} +${chalk.cyan('https://jestjs.io/docs/en/configuration.html')} ${chalk.bold.red('Details:')} diff --git a/packages/jest-runtime/src/index.js b/packages/jest-runtime/src/index.js index bc868d8fbbb5..c825dfcc515c 100644 --- a/packages/jest-runtime/src/index.js +++ b/packages/jest-runtime/src/index.js @@ -632,7 +632,7 @@ class Runtime { if (mockMetadata == null) { throw new Error( `Failed to get mock metadata: ${modulePath}\n\n` + - `See: http://jestjs.io/docs/manual-mocks.html#content`, + `See: https://jestjs.io/docs/manual-mocks.html#content`, ); } this._mockMetaDataCache[modulePath] = mockMetadata; diff --git a/packages/jest-validate/src/__tests__/__snapshots__/validate_cli_options.test.js.snap b/packages/jest-validate/src/__tests__/__snapshots__/validate_cli_options.test.js.snap index 21a703ef034f..3bdd2c0bb8b5 100644 --- a/packages/jest-validate/src/__tests__/__snapshots__/validate_cli_options.test.js.snap +++ b/packages/jest-validate/src/__tests__/__snapshots__/validate_cli_options.test.js.snap @@ -7,7 +7,7 @@ exports[`fails for multiple unknown options 1`] = ` [\\"jest\\", \\"test\\"] CLI Options Documentation: - https://facebook.github.io/jest/docs/en/cli.html + https://jestjs.io/docs/en/cli.html " `; @@ -17,6 +17,6 @@ exports[`fails for unknown option 1`] = ` Unrecognized option \\"unknown\\". CLI Options Documentation: - https://facebook.github.io/jest/docs/en/cli.html + https://jestjs.io/docs/en/cli.html " `; diff --git a/packages/jest-validate/src/validate_cli_options.js b/packages/jest-validate/src/validate_cli_options.js index d4e7ebcf382e..28f3debff0bf 100644 --- a/packages/jest-validate/src/validate_cli_options.js +++ b/packages/jest-validate/src/validate_cli_options.js @@ -16,7 +16,7 @@ import defaultConfig from './default_config'; const BULLET: string = chalk.bold('\u25cf'); export const DOCUMENTATION_NOTE = ` ${chalk.bold('CLI Options Documentation:')} - https://facebook.github.io/jest/docs/en/cli.html + https://jestjs.io/docs/en/cli.html `; const createCLIValidationError = ( @@ -27,7 +27,7 @@ const createCLIValidationError = ( let message; const comment = ` ${chalk.bold('CLI Options Documentation')}:\n` + - ` https://facebook.github.io/jest/docs/en/cli.html\n`; + ` https://jestjs.io/docs/en/cli.html\n`; if (unrecognizedOptions.length === 1) { const unrecognized = unrecognizedOptions[0]; diff --git a/packages/jest-watcher/package.json b/packages/jest-watcher/package.json index e6afd3f3509d..069c0572705e 100644 --- a/packages/jest-watcher/package.json +++ b/packages/jest-watcher/package.json @@ -15,6 +15,6 @@ "bugs": { "url": "https://github.com/facebook/jest/issues" }, - "homepage": "http://facebook.github.io/jest/", + "homepage": "https://jestjs.io/", "license": "MIT" } diff --git a/packages/jest/README.md b/packages/jest/README.md index 8213f3605bf1..4e02089b45ac 100644 --- a/packages/jest/README.md +++ b/packages/jest/README.md @@ -6,6 +6,6 @@ - **🏃🏽 Instant Feedback**: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files. -- **📸 Snapshot Testing**: Jest can [capture snapshots](http://facebook.github.io/jest/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing. +- **📸 Snapshot Testing**: Jest can [capture snapshots](https://jestjs.io/docs/snapshot-testing.html) of React trees or other serializable values to simplify UI testing. -Read More: http://facebook.github.io/jest/ +Read More: https://jestjs.io/ diff --git a/packages/jest/package.json b/packages/jest/package.json index b12568bd1524..08891bb75f8e 100644 --- a/packages/jest/package.json +++ b/packages/jest/package.json @@ -17,7 +17,7 @@ "type": "git", "url": "https://github.com/facebook/jest" }, - "homepage": "http://jestjs.io/", + "homepage": "https://jestjs.io/", "license": "MIT", "keywords": [ "ava", diff --git a/website/blog/2016-03-11-javascript-unit-testing-performance.md b/website/blog/2016-03-11-javascript-unit-testing-performance.md index 025ad6198fd1..4daeb517fd72 100644 --- a/website/blog/2016-03-11-javascript-unit-testing-performance.md +++ b/website/blog/2016-03-11-javascript-unit-testing-performance.md @@ -116,4 +116,4 @@ More importantly, adding new tests causes total runtime to grow very slowly. Eng With Jest's recent 0.9 release and performance improvements from the [node-haste2 integration](https://github.com/facebook/jest/pull/599), the runtime of the [Relay](https://github.com/facebook/relay) framework's test suite went down from 60 seconds to about 25 and the [react-native](https://github.com/facebook/react-native) test suite now finishes in less than ten seconds on a 13” MacBook Pro. -We're very happy with the wins we've seen so far, and we're going to keep working on Jest and making it better. If you are curious about contributing to Jest, feel free get in touch on GitHub, [Discord](http://facebook.github.io/jest/support.html) or Facebook :) +We're very happy with the wins we've seen so far, and we're going to keep working on Jest and making it better. If you are curious about contributing to Jest, feel free get in touch on GitHub, [Discord](https://jestjs.io/support.html) or Facebook :) diff --git a/website/blog/2016-04-12-jest-11.md b/website/blog/2016-04-12-jest-11.md index ed839e2e8524..c2d2e7bc0652 100644 --- a/website/blog/2016-04-12-jest-11.md +++ b/website/blog/2016-04-12-jest-11.md @@ -13,7 +13,7 @@ If you are using Jest 0.9 or Jest 0.10 the upgrade should be seamless. All chang #### Babel Integration and Simplified Setup -`babel-jest` was adopted within the newly modularized Jest [repository](https://github.com/facebook/jest/tree/master/packages) and it is now seamlessly integrated into Jest. If you are upgrading from an older version of Jest or are looking to adopt Jest, we recommend reading the [Getting Started guide](http://facebook.github.io/jest/docs/getting-started.html). +`babel-jest` was adopted within the newly modularized Jest [repository](https://github.com/facebook/jest/tree/master/packages) and it is now seamlessly integrated into Jest. If you are upgrading from an older version of Jest or are looking to adopt Jest, we recommend reading the [Getting Started guide](https://jestjs.io/docs/getting-started.html). @@ -49,7 +49,7 @@ import LikeButton from 'LikeButton'; // LikeButton is properly unmocked! #### (Auto)Mocking Improvements -We have made numerous improvements and bug fixes to Jest's automocking feature, improved npm3 support and added new manual mocking APIs. Many people have expressed a desire use Jest with the automocking feature disabled. A global configuration option [`automock`](http://facebook.github.io/jest/docs/api.html#automock-boolean), which can be set to `false`, was added. +We have made numerous improvements and bug fixes to Jest's automocking feature, improved npm3 support and added new manual mocking APIs. Many people have expressed a desire use Jest with the automocking feature disabled. A global configuration option [`automock`](https://jestjs.io/docs/api.html#automock-boolean), which can be set to `false`, was added. We have also added two new APIs to simplify manual mocks. `jest.mock` specifies a manual mock factory for a specific test: @@ -74,17 +74,17 @@ expect(mockFn.calls.length).toEqual(1); #### Performance -We recently wrote about some [performance improvements](http://facebook.github.io/jest/blog/2016/03/11/javascript-unit-testing-performance.html) we've made in Jest. Most notably, startup time has been improved and we are now in a comfortable place with regards to performance. +We recently wrote about some [performance improvements](https://jestjs.io/blog/2016/03/11/javascript-unit-testing-performance.html) we've made in Jest. Most notably, startup time has been improved and we are now in a comfortable place with regards to performance. #### Jasmine and Test Assertion Improvements -When Jest was open sourced it shipped with Jasmine 1. Jest was designed to work with any test assertion library and optional Jasmine 2 support was added through an [external contribution](https://github.com/facebook/jest/pull/330) at the end of last year. This change delivers better performance and provides a better APIs over the previous version of Jasmine. As such, we have converted all our JavaScript tests at Facebook to Jasmine 2. With Jest 11 we are making Jasmine 2 the new default. Jasmine 1 can be enabled through the [`testRunner`](http://facebook.github.io/jest/docs/api.html#testrunner-string) configuration option. +When Jest was open sourced it shipped with Jasmine 1. Jest was designed to work with any test assertion library and optional Jasmine 2 support was added through an [external contribution](https://github.com/facebook/jest/pull/330) at the end of last year. This change delivers better performance and provides a better APIs over the previous version of Jasmine. As such, we have converted all our JavaScript tests at Facebook to Jasmine 2. With Jest 11 we are making Jasmine 2 the new default. Jasmine 1 can be enabled through the [`testRunner`](https://jestjs.io/docs/api.html#testrunner-string) configuration option. We have also made many updates around Jasmine. The failure messages for custom matchers provided for Jest's mock functions were improved and will now also work for Jasmine spies. Skipped tests, when using `fit` or `fdescribe,` are now properly reported at the end of a test run. #### Other Changes -The `jest --watch` command has been rewritten and improved. By default it now only runs tests related to changed files. If you want to run all tests on every change, you can run `jest --watch=all`. The verbose logger output has also been improved and we've added more helpful warnings and error messages. We added a [`testEnvironment`](http://facebook.github.io/jest/docs/api.html#testenvironment-string) configuration option to customize the test environment. For example, when building a node service, a special `node` environment instead of `jsdom` can be used. Finally, the website and all documentation have been completely rewritten. +The `jest --watch` command has been rewritten and improved. By default it now only runs tests related to changed files. If you want to run all tests on every change, you can run `jest --watch=all`. The verbose logger output has also been improved and we've added more helpful warnings and error messages. We added a [`testEnvironment`](https://jestjs.io/docs/api.html#testenvironment-string) configuration option to customize the test environment. For example, when building a node service, a special `node` environment instead of `jsdom` can be used. Finally, the website and all documentation have been completely rewritten. All changes from the past few months can be found in the [CHANGELOG](https://github.com/facebook/jest/blob/master/CHANGELOG.md). diff --git a/website/blog/2016-06-22-jest-13.md b/website/blog/2016-06-22-jest-13.md index ad0d08dccfbf..e0ea31c97caf 100644 --- a/website/blog/2016-06-22-jest-13.md +++ b/website/blog/2016-06-22-jest-13.md @@ -25,4 +25,4 @@ With the help of [lerna](https://github.com/lerna/lerna), we continued to modula - Added the duration of individual tests in verbose mode. - Added the ability to record snapshots in Jest. We'll be publishing a separate blog post about this feature soon. -Finally, we have received a complete website redesign done by Matthew Johnston and added documentation for using [Jest with Webpack](http://facebook.github.io/jest/docs/tutorial-webpack.html#content). Happy Jesting! +Finally, we have received a complete website redesign done by Matthew Johnston and added documentation for using [Jest with Webpack](https://jestjs.io/docs/tutorial-webpack.html#content). Happy Jesting! diff --git a/website/blog/2016-07-27-jest-14.md b/website/blog/2016-07-27-jest-14.md index 3fb70ade3c40..2700c14e6b4e 100644 --- a/website/blog/2016-07-27-jest-14.md +++ b/website/blog/2016-07-27-jest-14.md @@ -43,7 +43,7 @@ If we change the address the Link component in our example is pointing to, Jest ![snapshot-testing](/img/blog/snapshot.png) -Now you know that you either need to accept the changes with `jest -u`, or fix the component if the changes were unintentional. To try out this functionality, please clone the [snapshot example](https://github.com/facebook/jest/tree/master/examples/snapshot), modify the Link component and run Jest. We updated the [React Tutorial](/jest/docs/tutorial-react.html) with a new guide for snapshot testing. +Now you know that you either need to accept the changes with `jest -u`, or fix the component if the changes were unintentional. To try out this functionality, please clone the [snapshot example](https://github.com/facebook/jest/tree/master/examples/snapshot), modify the Link component and run Jest. We updated the [React Tutorial](/docs/tutorial-react.html) with a new guide for snapshot testing. This feature was built by [Ben Alpert](https://twitter.com/soprano) and [Cristian Carlesso](https://twitter.com/kentaromiura). @@ -59,7 +59,7 @@ You can start using Jest with react-native by running `yarn add --dev jest-react } ``` -- [Tutorial and setup guide](/jest/docs/tutorial-react-native.html#content) +- [Tutorial and setup guide](/docs/tutorial-react-native.html#content) - [Example project](https://github.com/facebook/jest/tree/master/examples/react-native) - [Example pull request for _snowflake_](https://github.com/bartonhammond/snowflake/pull/110), a popular react-native open source library. diff --git a/website/blog/2016-09-01-jest-15.md b/website/blog/2016-09-01-jest-15.md index eb7de1673f34..c64ed4da6b9f 100644 --- a/website/blog/2016-09-01-jest-15.md +++ b/website/blog/2016-09-01-jest-15.md @@ -5,9 +5,9 @@ authorURL: http://twitter.com/cpojer authorFBID: 100000023028168 --- -We spent the past year making Jest [faster](http://facebook.github.io/jest/blog/2016/03/11/javascript-unit-testing-performance.html), [easier to configure](http://facebook.github.io/jest/blog/2016/04/12/jest-11.html), [added tons of features](http://facebook.github.io/jest/blog/2016/06/22/jest-13.html) and built [snapshot testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html). However, there were two areas where we invested very little: the CLI output and user experience. With Jest 15 we are changing the framework radically to make it easier to use both for beginners and experienced users. We are excited that our investment in Jest is now paying off: we can move fast and improve the framework for Facebook and the open source community at light-speed. Jest's goal is to come with batteries included and to require as little configuration as necessary. We recently got a chance to explain our philosophy on a [create-react-app issue](https://github.com/facebookincubator/create-react-app/pull/250#issuecomment-237098619). +We spent the past year making Jest [faster](https://jestjs.io/blog/2016/03/11/javascript-unit-testing-performance.html), [easier to configure](https://jestjs.io/blog/2016/04/12/jest-11.html), [added tons of features](https://jestjs.io/blog/2016/06/22/jest-13.html) and built [snapshot testing](https://jestjs.io/blog/2016/07/27/jest-14.html). However, there were two areas where we invested very little: the CLI output and user experience. With Jest 15 we are changing the framework radically to make it easier to use both for beginners and experienced users. We are excited that our investment in Jest is now paying off: we can move fast and improve the framework for Facebook and the open source community at light-speed. Jest's goal is to come with batteries included and to require as little configuration as necessary. We recently got a chance to explain our philosophy on a [create-react-app issue](https://github.com/facebookincubator/create-react-app/pull/250#issuecomment-237098619). -The most important change to talk about is a set of [new defaults](https://github.com/facebook/jest/pull/1511). If you are an existing Jest user you will very likely need to update your configuration for Jest 15. In most cases it will simplify your setup and Jest will provide useful error messages during the upgrade. All of the new defaults can be disabled to suit your needs, but we still consider the disabled features critical for Jest in certain situations and will continue to use and support them at Facebook long-term. Our [API documentation](https://facebook.github.io/jest/docs/api.html) was also completely rewritten to reflect these changes. [This pull request for React](https://github.com/facebook/react/pull/7625/files) highlights some of the changes necessary for existing projects. +The most important change to talk about is a set of [new defaults](https://github.com/facebook/jest/pull/1511). If you are an existing Jest user you will very likely need to update your configuration for Jest 15. In most cases it will simplify your setup and Jest will provide useful error messages during the upgrade. All of the new defaults can be disabled to suit your needs, but we still consider the disabled features critical for Jest in certain situations and will continue to use and support them at Facebook long-term. Our [API documentation](https://jestjs.io/docs/api.html) was also completely rewritten to reflect these changes. [This pull request for React](https://github.com/facebook/react/pull/7625/files) highlights some of the changes necessary for existing projects. @@ -76,7 +76,7 @@ We believe it is better to put users in control so we disabled the implicit rese By default Jest used to mock all timer functions like `setTimeout` or `process.nextTick` and provided an API `jest.runAllTimers()` to advance timers programatically. This is useful when a piece of code sets a long timeout that we don't want to wait for in a test. -However we found that most of the time the use cases are quite isolated. [Async programming](http://facebook.github.io/jest/docs/tutorial-async.html) has also become much simpler in our test runner. Jest now uses the real timers by default. +However we found that most of the time the use cases are quite isolated. [Async programming](https://jestjs.io/docs/tutorial-async.html) has also become much simpler in our test runner. Jest now uses the real timers by default. You can still override this by specifying `"timers": "fake"` in the configuration or by calling `jest.useRealTimers()` and `jest.useFakeTimers()` global switches. diff --git a/website/blog/2016-12-15-2016-in-jest.md b/website/blog/2016-12-15-2016-in-jest.md index e91dad75c2c7..587ebe7bb8fa 100644 --- a/website/blog/2016-12-15-2016-in-jest.md +++ b/website/blog/2016-12-15-2016-in-jest.md @@ -13,7 +13,7 @@ The newly created [react-test-renderer](https://yarnpkg.com/en/package/react-tes The [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) project was rewritten with performance in mind to drive Jest's snapshot feature, was recently merged into Jest's monorepo and is also helpful in other [test runners](https://github.com/avajs/ava/pull/1154). Nowadays Jest is much more about collecting different ideas and solutions to testing than it is about one specific implementation of a test framework. -I'd like to deeply thank all the people that have [contributed to Jest this year](https://github.com/facebook/jest/graphs/contributors?from=2016-01-01&to=2016-12-14&type=c), both from the open source community and at Facebook: Dmitrii Abramov, Cristian Carlesso, Dan Abramov, Daniel Lo Nigro, Maxim Derbin, Evan Scott, Forbes Lindesay, Keyan Zhang and 60 more people. We'd also like to welcome [Michał Pierzchała (@thymikee)](https://twitter.com/thymikee) as first official external contributor to Jest. He's been doing a great job managing the issues and PRs on the repo. If you'd like to start contributing to Jest, we have a bunch of [good first tasks](https://github.com/facebook/jest/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+bug%22) and we are always happy to help on our [discord channel](https://facebook.github.io/jest/support.html). +I'd like to deeply thank all the people that have [contributed to Jest this year](https://github.com/facebook/jest/graphs/contributors?from=2016-01-01&to=2016-12-14&type=c), both from the open source community and at Facebook: Dmitrii Abramov, Cristian Carlesso, Dan Abramov, Daniel Lo Nigro, Maxim Derbin, Evan Scott, Forbes Lindesay, Keyan Zhang and 60 more people. We'd also like to welcome [Michał Pierzchała (@thymikee)](https://twitter.com/thymikee) as first official external contributor to Jest. He's been doing a great job managing the issues and PRs on the repo. If you'd like to start contributing to Jest, we have a bunch of [good first tasks](https://github.com/facebook/jest/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+bug%22) and we are always happy to help on our [discord channel](https://jestjs.io/support.html). ## [repl.it](http://repl.it/) with Jest integration @@ -97,7 +97,7 @@ Jest was initially created more than five years ago and as such an old framework ## Plans for Jest in H1 2017 -Six months ago [we shared our plans for Jest](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html#what-s-next-for-jest) and we are happy that we were able to execute well on almost all of them. For the next six months, here is what we are planning: +Six months ago [we shared our plans for Jest](https://jestjs.io/blog/2016/07/27/jest-14.html#what-s-next-for-jest) and we are happy that we were able to execute well on almost all of them. For the next six months, here is what we are planning: - **Instant feedback:** [Nuclide](https://nuclide.io/) integration and an improved and [faster watch mode](https://github.com/facebook/jest/pull/2324#issuecomment-267149669). - **Improved developer experience:** new mocking APIs and improved assertions. diff --git a/website/blog/2017-01-30-a-great-developer-experience.md b/website/blog/2017-01-30-a-great-developer-experience.md index 6078e2fdbac5..4f820566d7c5 100644 --- a/website/blog/2017-01-30-a-great-developer-experience.md +++ b/website/blog/2017-01-30-a-great-developer-experience.md @@ -11,11 +11,11 @@ We strongly believe that great documentation is crucial to providing a great dev One of the changes you'll notice upon visiting our docs is the updated sidebar. The documentation is now divided into three main areas: an introduction to Jest, detailed guides to Jest's features, and a comprehensive API reference. -The **Introduction** section will guide you from installing Jest and writing your first case, to using Jest's matchers and testing async code. If you're new to Jest or need a quick refresher, these docs should get you up to speed in no time. If you've used Jest before and only need a quick reference on how it's installed, you need to go no further than the [Getting Started](/jest/docs/getting-started.html) guide. +The **Introduction** section will guide you from installing Jest and writing your first case, to using Jest's matchers and testing async code. If you're new to Jest or need a quick refresher, these docs should get you up to speed in no time. If you've used Jest before and only need a quick reference on how it's installed, you need to go no further than the [Getting Started](/docs/getting-started.html) guide. -Once you feel comfortable using Jest, proceed to the advanced **Guides** section. The new [Snapshot Testing guide](/jest/docs/snapshot-testing.html) covers everything you need to know about creating and maintaining snapshot test cases. +Once you feel comfortable using Jest, proceed to the advanced **Guides** section. The new [Snapshot Testing guide](/docs/snapshot-testing.html) covers everything you need to know about creating and maintaining snapshot test cases. -Finally, we've completely overhauled our API reference docs. You can now find detailed information on all of Jest's [Globals](/jest/docs/api.html), [matchers](/jest/docs/expect.html), and [every flag](/jest/docs/cli.html) supported by the `jest` CLI. +Finally, we've completely overhauled our API reference docs. You can now find detailed information on all of Jest's [Globals](/docs/api.html), [matchers](/docs/expect.html), and [every flag](/docs/cli.html) supported by the `jest` CLI. @@ -25,7 +25,7 @@ The colors in the Jest logo and on the website have felt outdated to us for a wh ## Who's using Jest? -We have created a [showcase of users](/jest/users.html) to highlight some of the companies that are using Jest. We're thankful to all of these companies for using Jest to test their websites, mobile apps, and APIs. If you're using Jest, check out the guidelines on GitHub and send us a pull request! +We have created a [showcase of users](/users.html) to highlight some of the companies that are using Jest. We're thankful to all of these companies for using Jest to test their websites, mobile apps, and APIs. If you're using Jest, check out the guidelines on GitHub and send us a pull request!
@@ -39,7 +39,7 @@ We have created a [showcase of users](/jest/users.html) to highlight some of the ## Jest in the browser -As highlighted [last month](/jest/blog/2016/12/15/2016-in-jest.html), it is now possible to use Jest directly in the browser using [repl.it](https://repl.it/languages/jest). If you want to try out Jest before installing it, you can easily do so below or directly from the Jest homepage. Go ahead and give it a try! +As highlighted [last month](/blog/2016/12/15/2016-in-jest.html), it is now possible to use Jest directly in the browser using [repl.it](https://repl.it/languages/jest). If you want to try out Jest before installing it, you can easily do so below or directly from the Jest homepage. Go ahead and give it a try!
diff --git a/website/blog/2017-02-21-jest-19-immersive-watch-mode-test-platform-improvements.md b/website/blog/2017-02-21-jest-19-immersive-watch-mode-test-platform-improvements.md index 3118fb2981fd..dcc4182164a7 100644 --- a/website/blog/2017-02-21-jest-19-immersive-watch-mode-test-platform-improvements.md +++ b/website/blog/2017-02-21-jest-19-immersive-watch-mode-test-platform-improvements.md @@ -77,9 +77,9 @@ We now also error on invalid CLI arguments instead of ignoring them. But we've g ## `expect` Improvements -- [`expect.addSnapshotSerializer`](/jest/docs/expect.html#expectaddsnapshotserializerserializer) -- [`expect.stringContaining`](/jest/docs/expect.html#expectstringcontainingstring) -- [`jest.spyOn`](/jest/docs/jest-object.html#jestspyonobject-methodname) +- [`expect.addSnapshotSerializer`](/docs/expect.html#expectaddsnapshotserializerserializer) +- [`expect.stringContaining`](/docs/expect.html#expectstringcontainingstring) +- [`jest.spyOn`](/docs/jest-object.html#jestspyonobject-methodname) We're close to almost full feature parity with the `expect` npm package. [Michael Jackson](https://twitter.com/mjackson), the author of the package, agreed to [donate](https://github.com/facebook/jest/issues/1679) it to the Jest project, which means that `jest-matchers` will be renamed to `expect`. Since our version of `expect` is not intended to be fully compatible, [Christopher Chedeau](https://twitter.com/Vjeux) is working on a codemod to make the transition painless. Christopher also worked on a number of improvements to `jest-matchers` which enables it to be used outside of Jest and even [works inside browsers](https://github.com/facebook/jest/pull/2795). @@ -105,7 +105,7 @@ We're happy to announce that `jest-validate` is validating config options of [pr ## Improved asymmetric matchers -We moved the asymmetric matchers implementation from Jasmine into Jest, which enabled us to further improve the user experience around them. As a result, asymmetric matchers are now pretty-printed nicely, we added the new [`expect.stringContaining()`](http://facebook.github.io/jest/docs/expect.html#expectstringcontainingstring) matcher and we also paired them with [`expect.toMatchObject()`](http://facebook.github.io/jest/docs/expect.html#tomatchobjectobject) so you can use the best of both: +We moved the asymmetric matchers implementation from Jasmine into Jest, which enabled us to further improve the user experience around them. As a result, asymmetric matchers are now pretty-printed nicely, we added the new [`expect.stringContaining()`](https://jestjs.io/docs/expect.html#expectstringcontainingstring) matcher and we also paired them with [`expect.toMatchObject()`](https://jestjs.io/docs/expect.html#tomatchobjectobject) so you can use the best of both: ![asymmetric-matchers](/img/blog/19-asymmetric-matchers.png) @@ -121,10 +121,10 @@ As a part of our cleanups and fixes we removed the `mocksPattern` configuration As you may have already seen, [Hector Ramos](https://twitter.com/hectorramos) and [Kevin Lacker](https://twitter.com/lacker) gave Jest's documentation a fresh new look. We changed the way we organize the website and it now features Docs and API as separate pages: -- Under [Docs](https://facebook.github.io/jest/docs/getting-started.html#content) you can find an introduction to Jest, including [Getting Started](https://facebook.github.io/jest/docs/getting-started.html#content) or [Testing Asynchronous Code](https://facebook.github.io/jest/docs/asynchronous.html#content) and handy guides like [Snapshot Testing](https://facebook.github.io/jest/docs/snapshot-testing.html#content), [Testing React Native App](https://facebook.github.io/jest/docs/tutorial-react-native.html#content), [Using with webpack](https://facebook.github.io/jest/docs/webpack.html#content) or [Migrating to Jest](https://facebook.github.io/jest/docs/migration-guide.html#content) and many more! -- The [API](https://facebook.github.io/jest/docs/api.html) section on the other hand lists all available methods exposed by Jest: the `expect` and `jest` objects, mock functions, globals, along with configuration options from _package.json_ and from the CLI. +- Under [Docs](https://jestjs.io/docs/getting-started.html#content) you can find an introduction to Jest, including [Getting Started](https://jestjs.io/docs/getting-started.html#content) or [Testing Asynchronous Code](https://jestjs.io/docs/asynchronous.html#content) and handy guides like [Snapshot Testing](https://jestjs.io/docs/snapshot-testing.html#content), [Testing React Native App](https://jestjs.io/docs/tutorial-react-native.html#content), [Using with webpack](https://jestjs.io/docs/webpack.html#content) or [Migrating to Jest](https://jestjs.io/docs/migration-guide.html#content) and many more! +- The [API](https://jestjs.io/docs/api.html) section on the other hand lists all available methods exposed by Jest: the `expect` and `jest` objects, mock functions, globals, along with configuration options from _package.json_ and from the CLI. -The homepage was completely redesigned to be more descriptive of what Jest is about: “_Zero configuration testing platform_”. We also made sure it reads better on mobile devices. And for those using RSS – we finally provide a [feed for our blog](http://facebook.github.io/jest/blog/feed.xml). +The homepage was completely redesigned to be more descriptive of what Jest is about: “_Zero configuration testing platform_”. We also made sure it reads better on mobile devices. And for those using RSS – we finally provide a [feed for our blog](https://jestjs.io/blog/feed.xml). ## Community Updates diff --git a/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md b/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md index b77d832e5b23..b518e4363c9d 100644 --- a/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md +++ b/website/blog/2017-05-06-jest-20-delightful-testing-multi-project-runner.md @@ -5,7 +5,7 @@ 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: +A few months ago we announced [Jest 19](https://jestjs.io/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 @@ -36,7 +36,7 @@ Finally, we are now properly mapping code coverage when using TypeScript and we 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). +- **Better async testing:** Added new async/Promise support through resolves/rejects modifiers on expect: `expect(Promise(…)).resolves.toEqual(…)`. [See documentation](https://jestjs.io/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. @@ -76,7 +76,7 @@ As with every major release, we are making a number of breaking changes to make - **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). +- **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://jestjs.io/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 notably increased flow coverage, 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). diff --git a/website/blog/2017-12-18-jest-22.md b/website/blog/2017-12-18-jest-22.md index 05b0986051b5..b7b11813e4cc 100644 --- a/website/blog/2017-12-18-jest-22.md +++ b/website/blog/2017-12-18-jest-22.md @@ -61,7 +61,7 @@ test('asynchronous rejection', async () => { ## Asynchronous test environments -When [Puppeteer](https://github.com/GoogleChrome/puppeteer/), a way of programmatically interacting with a real Chromium Browser, was announced by the Google Chrome team in August, many wanted to be able to use Jest to write their tests running them in Chrome. The community have helped us out making this possible by allowing asynchronous test environments. We are still working on making this experience as good as possible, but please see [this guide](http://facebook.github.io/jest/docs/en/puppeteer.html) for how to use Puppeteer with Jest, starting today. +When [Puppeteer](https://github.com/GoogleChrome/puppeteer/), a way of programmatically interacting with a real Chromium Browser, was announced by the Google Chrome team in August, many wanted to be able to use Jest to write their tests running them in Chrome. The community have helped us out making this possible by allowing asynchronous test environments. We are still working on making this experience as good as possible, but please see [this guide](https://jestjs.io/docs/en/puppeteer.html) for how to use Puppeteer with Jest, starting today. ## Experimental Leak Detection @@ -73,11 +73,11 @@ When using watch mode, there is now a way to [focus only on tests that previousl ## Babel 7 support -Jest uses Babel under the hood to power code coverage and advanced mocking features. With Jest 22, it also supports the upcoming Babel 7. You'll find more in the documentation [here](http://facebook.github.io/jest/docs/en/getting-started.html#using-babel). +Jest uses Babel under the hood to power code coverage and advanced mocking features. With Jest 22, it also supports the upcoming Babel 7. You'll find more in the documentation [here](https://jestjs.io/docs/en/getting-started.html#using-babel). ## Mock function improvements -There has been a couple of changes to mock functions in Jest 22, making them even easier to use. Firstly, we added a [`mockName`](http://facebook.github.io/jest/docs/en/mock-function-api.html#mockfnmocknamevalue) property allowing you to name your mocks, which is useful in assertion failures. We have also made the Jest mock function serializable in `pretty-format`, meaning that you can snapshot test mocks. In Jest 21, `expect(jest.fn()).toMatchSnapshot()` would serialize to `[Function]`, in Jest 22, you might get something like this: +There has been a couple of changes to mock functions in Jest 22, making them even easier to use. Firstly, we added a [`mockName`](https://jestjs.io/docs/en/mock-function-api.html#mockfnmocknamevalue) property allowing you to name your mocks, which is useful in assertion failures. We have also made the Jest mock function serializable in `pretty-format`, meaning that you can snapshot test mocks. In Jest 21, `expect(jest.fn()).toMatchSnapshot()` would serialize to `[Function]`, in Jest 22, you might get something like this: ``` test('my mocking test', () => { diff --git a/website/blog/2018-05-29-jest-23-blazing-fast-delightful-testing.md b/website/blog/2018-05-29-jest-23-blazing-fast-delightful-testing.md index a6bb70836295..db924df35359 100644 --- a/website/blog/2018-05-29-jest-23-blazing-fast-delightful-testing.md +++ b/website/blog/2018-05-29-jest-23-blazing-fast-delightful-testing.md @@ -19,7 +19,7 @@ We've added a new default watch menu option we're calling Interactive Snapshot M ![Interactive snapshot mode in action](/img/blog/23-interactive.gif) -See the Interactive Snapshot Mode docs [here](https://facebook.github.io/jest/docs/en/snapshot-testing.html#interactive-snapshot-mode). +See the Interactive Snapshot Mode docs [here](https://jestjs.io/docs/en/snapshot-testing.html#interactive-snapshot-mode). ## Snapshot Property Matchers @@ -27,7 +27,7 @@ Often, objects you're snapshotting contain generated values like Dates and IDs. ![Snapshot Property Matchers](/img/blog/23-snapshot-matchers.png) -See the updated `toMatchSnapshot` [docs](https://facebook.github.io/jest/docs/en/expect.html#tomatchsnapshotpropertymatchers-snapshotname) or the Property Matcher [guide](https://facebook.github.io/jest/docs/en/snapshot-testing.html#property-matchers) for more information. +See the updated `toMatchSnapshot` [docs](https://jestjs.io/docs/en/expect.html#tomatchsnapshotpropertymatchers-snapshotname) or the Property Matcher [guide](https://jestjs.io/docs/en/snapshot-testing.html#property-matchers) for more information. ## Custom Asynchronous matchers @@ -35,7 +35,7 @@ We now support asynchronous matchers with `expect.extends`! Async matchers retur ![Custom asynchronous matchers in action](/img/blog/23-async-matchers.png) -Docs available [here](https://facebook.github.io/jest/docs/en/expect.html#expectextendmatchers). +Docs available [here](https://jestjs.io/docs/en/expect.html#expectextendmatchers). ## Custom Asymmetric Matchers @@ -45,7 +45,7 @@ Asymmetric matchers are a great tool to use when you only care about asymmetric ## Jest Each -[@mattphillipsio](https://twitter.com/mattphillipsio) has donated the `jest-each` package to Jest Core (thanks Matt!). `jest-each` is a library inspired by [`mocha-each`](https://yarnpkg.com/en/package/mocha-each) and [Spock Data Tables](http://spockframework.org/spock/docs/1.1/data_driven_testing.html#data-tables) which allows you to define a table of test cases, and then run a test for each row with the specified column values. We support both array types and template literals for all flavors of `describe` and `test`. Docs are available [here](https://facebook.github.io/jest/docs/en/api.html#testeachtable-name-fn), and for those not on Jest 23 yet, we're still publishing [`jest-each`](https://yarnpkg.com/en/package/jest-each) separately! +[@mattphillipsio](https://twitter.com/mattphillipsio) has donated the `jest-each` package to Jest Core (thanks Matt!). `jest-each` is a library inspired by [`mocha-each`](https://yarnpkg.com/en/package/mocha-each) and [Spock Data Tables](http://spockframework.org/spock/docs/1.1/data_driven_testing.html#data-tables) which allows you to define a table of test cases, and then run a test for each row with the specified column values. We support both array types and template literals for all flavors of `describe` and `test`. Docs are available [here](https://jestjs.io/docs/en/api.html#testeachtable-name-fn), and for those not on Jest 23 yet, we're still publishing [`jest-each`](https://yarnpkg.com/en/package/jest-each) separately! ![jest-each in action](/img/blog/23-jest-each.png) @@ -65,7 +65,7 @@ We only add matchers to core if we believe they will be useful to a large amount ![New matchers in action](/img/blog/23-new-matchers.png) -See the updated expect docs [here](https://facebook.github.io/jest/docs/en/expect.html). +See the updated expect docs [here](https://jestjs.io/docs/en/expect.html). ## Debug Hanging Tests @@ -79,11 +79,11 @@ And we offer a new flag `--detectOpenHandles` to help find the open handles: ![Running detectOpenHandles](/img/blog/23-hanging-after.png) -See the updated CLI docs [here](https://facebook.github.io/jest/docs/en/cli.html#detectopenhandles). +See the updated CLI docs [here](https://jestjs.io/docs/en/cli.html#detectopenhandles). ## Watch Mode Plugins -We have completely rewritten the watch mode system to allow adding custom plugins to watch mode. Watch Mode Plugins now make it possible to hook into Jest events and provide custom menu options in the Watch Mode Menu. All of the default Watch Mode prompts are implemented as plugins in this system, and the docs to create your own are available [here](https://facebook.github.io/jest/docs/en/watch-plugins.html). +We have completely rewritten the watch mode system to allow adding custom plugins to watch mode. Watch Mode Plugins now make it possible to hook into Jest events and provide custom menu options in the Watch Mode Menu. All of the default Watch Mode prompts are implemented as plugins in this system, and the docs to create your own are available [here](https://jestjs.io/docs/en/watch-plugins.html). With this change, we're also now able to bring back typeahead support as a Watch Mode Plugin via [jest-watch-typeahead](https://yarnpkg.com/en/package/jest-watch-typeahead)! diff --git a/website/i18n/en.json b/website/i18n/en.json index 8b93ff071148..40703dd91e52 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -44,11 +44,11 @@ "API Reference": "API Reference" }, "pages-strings": { - "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/jest/docs/en/getting-started.html) with Jest.\\n- [Troubleshoot](/jest/docs/en/troubleshooting.html) problems with Jest.\\n- Learn how to [configure Jest](/jest/docs/en/configuration.html).\\n- Look at the full [API Reference](/jest/docs/en/api.html).|no description given": "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/jest/docs/en/getting-started.html) with Jest.\\n- [Troubleshoot](/jest/docs/en/troubleshooting.html) problems with Jest.\\n- Learn how to [configure Jest](/jest/docs/en/configuration.html).\\n- Look at the full [API Reference](/jest/docs/en/api.html).", + "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/docs/en/getting-started.html) with Jest.\\n- [Troubleshoot](/docs/en/troubleshooting.html) problems with Jest.\\n- Learn how to [configure Jest](/docs/en/configuration.html).\\n- Look at the full [API Reference](/docs/en/api.html).|no description given": "Find what you're looking for in our detailed documentation and guides.\\n\\n- Learn how to [get started](/docs/en/getting-started.html) with Jest.\\n- [Troubleshoot](/docs/en/troubleshooting.html) problems with Jest.\\n- Learn how to [configure Jest](/docs/en/configuration.html).\\n- Look at the full [API Reference](/docs/en/api.html).", "Browse the docs|no description given": "Browse the docs", "Ask questions and find answers from other Jest users like you.\\n\\n- Join the [#jest](https://discord.gg/MWRhKCj) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!|no description given": "Ask questions and find answers from other Jest users like you.\\n\\n- Join the [#jest](https://discord.gg/MWRhKCj) channel on [Reactiflux](http://www.reactiflux.com/), a Discord community.\\n- Many members of the community use Stack Overflow. Read through the [existing questions](https://stackoverflow.com/questions/tagged/jestjs) tagged with **jestjs** or [ask your own](https://stackoverflow.com/questions/ask)!", "Join the community|no description given": "Join the community", - "Find out what's new with Jest.\\n\\n- Follow [Jest](https://twitter.com/fbjest) on Twitter.\\n- Subscribe to the [Jest blog](/jest/blog/).\\n- Look at the [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md).|no description given": "Find out what's new with Jest.\\n\\n- Follow [Jest](https://twitter.com/fbjest) on Twitter.\\n- Subscribe to the [Jest blog](/jest/blog/).\\n- Look at the [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md).", + "Find out what's new with Jest.\\n\\n- Follow [Jest](https://twitter.com/fbjest) on Twitter.\\n- Subscribe to the [Jest blog](/blog/).\\n- Look at the [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md).|no description given": "Find out what's new with Jest.\\n\\n- Follow [Jest](https://twitter.com/fbjest) on Twitter.\\n- Subscribe to the [Jest blog](/blog/).\\n- Look at the [changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md).", "Stay up to date|no description given": "Stay up to date", "Need help?|no description given": "Need help?", "Jest is worked on full-time by Facebook's JavaScript Foundation team. Team members are often around and available for questions.|no description given": "Jest is worked on full-time by Facebook's JavaScript Foundation team. Team members are often around and available for questions.", @@ -72,13 +72,13 @@ "Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated \\\"zero-configuration\\\" experience. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn results in more stable and healthy code bases.|no description given": "Jest is used by Facebook to test all JavaScript code including React applications. One of Jest's philosophies is to provide an integrated \\\"zero-configuration\\\" experience. We observed that when engineers are provided with ready-to-use tools, they end up writing more tests, which in turn results in more stable and healthy code bases.", "Jest parallelizes test runs across workers to maximize performance. Console messages are buffered and printed together with test results. Sandboxed test files and automatic global state resets for every test so no two tests conflict with each other.|no description given": "Jest parallelizes test runs across workers to maximize performance. Console messages are buffered and printed together with test results. Sandboxed test files and automatic global state resets for every test so no two tests conflict with each other.", "Fast and sandboxed|no description given": "Fast and sandboxed", - "Easily create code coverage reports using [`--coverage`](https://facebook.github.io/jest/docs/en/cli.html#coverage). No additional setup or libraries needed! Jest can collect code coverage information from entire projects, including untested files.|no description given": "Easily create code coverage reports using [`--coverage`](https://facebook.github.io/jest/docs/en/cli.html#coverage). No additional setup or libraries needed! Jest can collect code coverage information from entire projects, including untested files.", + "Easily create code coverage reports using [`--coverage`](https://jestjs.io/docs/en/cli.html#coverage). No additional setup or libraries needed! Jest can collect code coverage information from entire projects, including untested files.|no description given": "Easily create code coverage reports using [`--coverage`](https://jestjs.io/docs/en/cli.html#coverage). No additional setup or libraries needed! Jest can collect code coverage information from entire projects, including untested files.", "Built-in code coverage reports|no description given": "Built-in code coverage reports", "Jest is already configured when you use [`create-react-app`](https://facebook.github.io/react/blog/2016/07/22/create-apps-with-no-configuration.html) or [`react-native init`](http://facebook.github.io/react-native/docs/getting-started.html) to create your React and React Native projects. Place your tests in a `__tests__` folder, or name your test files with a `.spec.js` or `.test.js` extension. Whatever you prefer, Jest will find and run your tests.|no description given": "Jest is already configured when you use [`create-react-app`](https://facebook.github.io/react/blog/2016/07/22/create-apps-with-no-configuration.html) or [`react-native init`](http://facebook.github.io/react-native/docs/getting-started.html) to create your React and React Native projects. Place your tests in a `__tests__` folder, or name your test files with a `.spec.js` or `.test.js` extension. Whatever you prefer, Jest will find and run your tests.", "Zero configuration|no description given": "Zero configuration", "Try it out!|no description given": "Try it out!", "You can try out a real version of Jest using [repl.it](https://repl.it/languages/jest). Consider a function, `add()`, that adds two numbers. We can use a basic test in `add-test.js` to verify that 1 + 2 equals 3. Hit \\\"run\\\" to try it out!|no description given": "You can try out a real version of Jest using [repl.it](https://repl.it/languages/jest). Consider a function, `add()`, that adds two numbers. We can use a basic test in `add-test.js` to verify that 1 + 2 equals 3. Hit \\\"run\\\" to try it out!", - "Powerful [mocking library](/jest/docs/en/mock-functions.html) for functions and modules. Mock React Native components using `jest-react-native`.|no description given": "Powerful [mocking library](/jest/docs/en/mock-functions.html) for functions and modules. Mock React Native components using `jest-react-native`.", + "Powerful [mocking library](/docs/en/mock-functions.html) for functions and modules. Mock React Native components using `jest-react-native`.|no description given": "Powerful [mocking library](/docs/en/mock-functions.html) for functions and modules. Mock React Native components using `jest-react-native`.", "Powerful mocking library|no description given": "Powerful mocking library", "Jest works with any compile-to-JavaScript language and integrates seamlessly with [Babel](https://babeljs.io) and with TypeScript through [ts-jest](https://github.com/kulshekhar/ts-jest).|no description given": "Jest works with any compile-to-JavaScript language and integrates seamlessly with [Babel](https://babeljs.io) and with TypeScript through [ts-jest](https://github.com/kulshekhar/ts-jest).", "Works with TypeScript|no description given": "Works with TypeScript", diff --git a/website/pages/en/index.js b/website/pages/en/index.js index b7be89f8b32b..fe1f7c3ca8b1 100755 --- a/website/pages/en/index.js +++ b/website/pages/en/index.js @@ -293,7 +293,7 @@ class Index extends React.Component { content: ( Easily create code coverage reports using - [`--coverage`](https://facebook.github.io/jest/docs/en/cli.html#coverage). + [`--coverage`](https://jestjs.io/docs/en/cli.html#coverage). No additional setup or libraries needed! Jest can collect code coverage information from entire projects, including untested files. @@ -361,10 +361,9 @@ class Index extends React.Component { { content: ( - Powerful [mocking - library](/jest/docs/en/mock-functions.html) for functions - and modules. Mock React Native components using - `jest-react-native`. + Powerful [mocking library](/docs/en/mock-functions.html) + for functions and modules. Mock React Native components + using `jest-react-native`. ), image: '/img/content/feature-mocking.png', diff --git a/website/versioned_docs/version-22.0/Configuration.md b/website/versioned_docs/version-22.0/Configuration.md index f31b68453883..2ec3c5649c7f 100644 --- a/website/versioned_docs/version-22.0/Configuration.md +++ b/website/versioned_docs/version-22.0/Configuration.md @@ -821,7 +821,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/website/versioned_docs/version-22.0/ExpectAPI.md b/website/versioned_docs/version-22.0/ExpectAPI.md index b275042f19e3..5f2d187dcea1 100644 --- a/website/versioned_docs/version-22.0/ExpectAPI.md +++ b/website/versioned_docs/version-22.0/ExpectAPI.md @@ -896,4 +896,4 @@ And it will generate the following snapshot: exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`; ``` -Check out [React Tree Snapshot Testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html) for more information on snapshot testing. +Check out [React Tree Snapshot Testing](https://jestjs.io/blog/2016/07/27/jest-14.html) for more information on snapshot testing. diff --git a/website/versioned_docs/version-22.0/SnapshotTesting.md b/website/versioned_docs/version-22.0/SnapshotTesting.md index 7bd6ddea8579..d313a2df6215 100644 --- a/website/versioned_docs/version-22.0/SnapshotTesting.md +++ b/website/versioned_docs/version-22.0/SnapshotTesting.md @@ -42,7 +42,7 @@ exports[`renders correctly 1`] = ` The snapshot artifact should be committed alongside code changes, and reviewed as part of your code review process. Jest uses [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the test runner found a bug in your code that should be fixed, or the implementation has changed and the snapshot needs to be updated. -More information on how snapshot testing works and why we built it can be found on the [release blog post](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. +More information on how snapshot testing works and why we built it can be found on the [release blog post](https://jestjs.io/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. ### Updating Snapshots @@ -106,7 +106,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover ### What's the difference between snapshot testing and visual regression testing? -Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](http://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). +Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](https://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). ### Does snapshot testing substitute unit testing? diff --git a/website/versioned_docs/version-22.0/Troubleshooting.md b/website/versioned_docs/version-22.0/Troubleshooting.md index 139caa88d448..9a4fbc0bfe0d 100644 --- a/website/versioned_docs/version-22.0/Troubleshooting.md +++ b/website/versioned_docs/version-22.0/Troubleshooting.md @@ -240,4 +240,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html). diff --git a/website/versioned_docs/version-22.1/Configuration.md b/website/versioned_docs/version-22.1/Configuration.md index 602cc67a2ad2..a5c8d45dab97 100644 --- a/website/versioned_docs/version-22.1/Configuration.md +++ b/website/versioned_docs/version-22.1/Configuration.md @@ -811,7 +811,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/website/versioned_docs/version-22.1/ExpectAPI.md b/website/versioned_docs/version-22.1/ExpectAPI.md index 1c8d32ef09ec..62c0ab000ae4 100644 --- a/website/versioned_docs/version-22.1/ExpectAPI.md +++ b/website/versioned_docs/version-22.1/ExpectAPI.md @@ -890,4 +890,4 @@ And it will generate the following snapshot: exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`; ``` -Check out [React Tree Snapshot Testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html) for more information on snapshot testing. +Check out [React Tree Snapshot Testing](https://jestjs.io/blog/2016/07/27/jest-14.html) for more information on snapshot testing. diff --git a/website/versioned_docs/version-22.1/SnapshotTesting.md b/website/versioned_docs/version-22.1/SnapshotTesting.md index 213737ed6e8f..34c5f6068635 100644 --- a/website/versioned_docs/version-22.1/SnapshotTesting.md +++ b/website/versioned_docs/version-22.1/SnapshotTesting.md @@ -42,7 +42,7 @@ exports[`renders correctly 1`] = ` The snapshot artifact should be committed alongside code changes, and reviewed as part of your code review process. Jest uses [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the test runner found a bug in your code that should be fixed, or the implementation has changed and the snapshot needs to be updated. -More information on how snapshot testing works and why we built it can be found on the [release blog post](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. +More information on how snapshot testing works and why we built it can be found on the [release blog post](https://jestjs.io/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. ### Updating Snapshots @@ -106,7 +106,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover ### What's the difference between snapshot testing and visual regression testing? -Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html#why-snapshot-testing). +Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](https://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). ### Does snapshot testing substitute unit testing? diff --git a/website/versioned_docs/version-22.1/Troubleshooting.md b/website/versioned_docs/version-22.1/Troubleshooting.md index d5eb5d736287..d532c3ba00b6 100644 --- a/website/versioned_docs/version-22.1/Troubleshooting.md +++ b/website/versioned_docs/version-22.1/Troubleshooting.md @@ -240,4 +240,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html). diff --git a/website/versioned_docs/version-22.2/Configuration.md b/website/versioned_docs/version-22.2/Configuration.md index 311d130dc0c1..8617ae3bd449 100644 --- a/website/versioned_docs/version-22.2/Configuration.md +++ b/website/versioned_docs/version-22.2/Configuration.md @@ -826,7 +826,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/website/versioned_docs/version-22.2/ExpectAPI.md b/website/versioned_docs/version-22.2/ExpectAPI.md index 634eb55df34a..d0a7e6433a5f 100644 --- a/website/versioned_docs/version-22.2/ExpectAPI.md +++ b/website/versioned_docs/version-22.2/ExpectAPI.md @@ -890,4 +890,4 @@ And it will generate the following snapshot: exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`; ``` -Check out [React Tree Snapshot Testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html) for more information on snapshot testing. +Check out [React Tree Snapshot Testing](https://jestjs.io/blog/2016/07/27/jest-14.html) for more information on snapshot testing. diff --git a/website/versioned_docs/version-22.2/MoreResources.md b/website/versioned_docs/version-22.2/MoreResources.md index 6d45ff7fd166..d5cff6ebcc3d 100644 --- a/website/versioned_docs/version-22.2/MoreResources.md +++ b/website/versioned_docs/version-22.2/MoreResources.md @@ -22,4 +22,4 @@ You will find a number of example test cases in the [`examples`](https://github. Ask questions and find answers from other Jest users like you. [Reactiflux](http://www.reactiflux.com/) is a Discord chat where a lot of Jest discussion happens. Check out the [#jest](https://discordapp.com/channels/102860784329052160/103622435865104384) channel. -Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/jest/blog/) to find out what's happening in the world of Jest. +Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/blog/) to find out what's happening in the world of Jest. diff --git a/website/versioned_docs/version-22.2/SnapshotTesting.md b/website/versioned_docs/version-22.2/SnapshotTesting.md index 47fc4e006029..fb7299a67de8 100644 --- a/website/versioned_docs/version-22.2/SnapshotTesting.md +++ b/website/versioned_docs/version-22.2/SnapshotTesting.md @@ -42,7 +42,7 @@ exports[`renders correctly 1`] = ` The snapshot artifact should be committed alongside code changes, and reviewed as part of your code review process. Jest uses [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the test runner found a bug in your code that should be fixed, or the implementation has changed and the snapshot needs to be updated. -More information on how snapshot testing works and why we built it can be found on the [release blog post](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. +More information on how snapshot testing works and why we built it can be found on the [release blog post](https://jestjs.io/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. ### Updating Snapshots @@ -106,7 +106,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover ### What's the difference between snapshot testing and visual regression testing? -Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html#why-snapshot-testing). +Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](https://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). ### Does snapshot testing substitute unit testing? diff --git a/website/versioned_docs/version-22.2/Troubleshooting.md b/website/versioned_docs/version-22.2/Troubleshooting.md index 7dd30bc6246a..013063088d7d 100644 --- a/website/versioned_docs/version-22.2/Troubleshooting.md +++ b/website/versioned_docs/version-22.2/Troubleshooting.md @@ -240,4 +240,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html). diff --git a/website/versioned_docs/version-22.3/Configuration.md b/website/versioned_docs/version-22.3/Configuration.md index 2a53ad31a92c..fcfc724f600e 100644 --- a/website/versioned_docs/version-22.3/Configuration.md +++ b/website/versioned_docs/version-22.3/Configuration.md @@ -811,7 +811,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/website/versioned_docs/version-22.3/ExpectAPI.md b/website/versioned_docs/version-22.3/ExpectAPI.md index e162bc706430..09c2adc45094 100644 --- a/website/versioned_docs/version-22.3/ExpectAPI.md +++ b/website/versioned_docs/version-22.3/ExpectAPI.md @@ -890,4 +890,4 @@ And it will generate the following snapshot: exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`; ``` -Check out [React Tree Snapshot Testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html) for more information on snapshot testing. +Check out [React Tree Snapshot Testing](https://jestjs.io/blog/2016/07/27/jest-14.html) for more information on snapshot testing. diff --git a/website/versioned_docs/version-22.3/MoreResources.md b/website/versioned_docs/version-22.3/MoreResources.md index c36602c2341c..628b2aa29bbb 100644 --- a/website/versioned_docs/version-22.3/MoreResources.md +++ b/website/versioned_docs/version-22.3/MoreResources.md @@ -22,4 +22,4 @@ You will find a number of example test cases in the [`examples`](https://github. Ask questions and find answers from other Jest users like you. [Reactiflux](http://www.reactiflux.com/) is a Discord chat where a lot of Jest discussion happens. Check out the [#jest](https://discord.gg/MWRhKCj) channel. -Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/jest/blog/) to find out what's happening in the world of Jest. +Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/blog/) to find out what's happening in the world of Jest. diff --git a/website/versioned_docs/version-22.3/SnapshotTesting.md b/website/versioned_docs/version-22.3/SnapshotTesting.md index c67653cd4169..daa3ef4aed48 100644 --- a/website/versioned_docs/version-22.3/SnapshotTesting.md +++ b/website/versioned_docs/version-22.3/SnapshotTesting.md @@ -42,7 +42,7 @@ exports[`renders correctly 1`] = ` The snapshot artifact should be committed alongside code changes, and reviewed as part of your code review process. Jest uses [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the test runner found a bug in your code that should be fixed, or the implementation has changed and the snapshot needs to be updated. -More information on how snapshot testing works and why we built it can be found on the [release blog post](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. +More information on how snapshot testing works and why we built it can be found on the [release blog post](https://jestjs.io/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. ### Updating Snapshots @@ -172,7 +172,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover ### What's the difference between snapshot testing and visual regression testing? -Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html#why-snapshot-testing). +Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](https://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). ### Does snapshot testing substitute unit testing? diff --git a/website/versioned_docs/version-22.3/Troubleshooting.md b/website/versioned_docs/version-22.3/Troubleshooting.md index d943bd63a4c0..0d6e281e1ea8 100644 --- a/website/versioned_docs/version-22.3/Troubleshooting.md +++ b/website/versioned_docs/version-22.3/Troubleshooting.md @@ -240,4 +240,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html). diff --git a/website/versioned_docs/version-22.4/Configuration.md b/website/versioned_docs/version-22.4/Configuration.md index e58974554512..fbd90babc64f 100644 --- a/website/versioned_docs/version-22.4/Configuration.md +++ b/website/versioned_docs/version-22.4/Configuration.md @@ -844,7 +844,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/website/versioned_docs/version-22.4/Troubleshooting.md b/website/versioned_docs/version-22.4/Troubleshooting.md index 4e2d13d90f19..4297243b24ce 100644 --- a/website/versioned_docs/version-22.4/Troubleshooting.md +++ b/website/versioned_docs/version-22.4/Troubleshooting.md @@ -232,7 +232,7 @@ If you would like to continue using Jasmine 1, set the `testRunner` config optio ## Compatibility issues -Jest takes advantage of new features added to Node 6. We recommend that you upgrade to the latest stable release of Node. The minimum supported version is `v6.0.0`. Versions `0.x.x` and `4.x.x` are not supported because the `jsdom` version used in Jest doesn't support Node 4. However, if you need to run Jest on Node 4, you can use the `testEnvironment` config to use a [custom environment](https://facebook.github.io/jest/docs/en/configuration.html#testenvironment-string) that supports Node 4, such as [`jest-environment-node`](https://yarnpkg.com/en/package/jest-environment-node). +Jest takes advantage of new features added to Node 6. We recommend that you upgrade to the latest stable release of Node. The minimum supported version is `v6.0.0`. Versions `0.x.x` and `4.x.x` are not supported because the `jsdom` version used in Jest doesn't support Node 4. However, if you need to run Jest on Node 4, you can use the `testEnvironment` config to use a [custom environment](https://jestjs.io/docs/en/configuration.html#testenvironment-string) that supports Node 4, such as [`jest-environment-node`](https://yarnpkg.com/en/package/jest-environment-node). ## `coveragePathIgnorePatterns` seems to not have any effect. @@ -240,4 +240,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html). diff --git a/website/versioned_docs/version-23.0/Configuration.md b/website/versioned_docs/version-23.0/Configuration.md index 7316927af602..d8030d50b0f4 100644 --- a/website/versioned_docs/version-23.0/Configuration.md +++ b/website/versioned_docs/version-23.0/Configuration.md @@ -871,7 +871,7 @@ These pattern strings match against the full path. Use the `` string to Example: `["/bower_components/", "/node_modules/"]`. -Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](http://facebook.github.io/jest/docs/en/tutorial-react-native.html#transformignorepatterns-customization). +Sometimes it happens (especially in React Native or TypeScript projects) that 3rd party modules are published as untranspiled. Since all files inside `node_modules` are not transformed by default, Jest will not understand the code in these modules, resulting in syntax errors. To overcome this, you may use `transformIgnorePatterns` to whitelist such modules. You'll find a good example of this use case in [React Native Guide](https://jestjs.io/docs/en/tutorial-react-native.html#transformignorepatterns-customization). ### `unmockedModulePathPatterns` [array] diff --git a/website/versioned_docs/version-23.0/ExpectAPI.md b/website/versioned_docs/version-23.0/ExpectAPI.md index de8a07b7adc3..3bb9ff873df7 100644 --- a/website/versioned_docs/version-23.0/ExpectAPI.md +++ b/website/versioned_docs/version-23.0/ExpectAPI.md @@ -1134,4 +1134,4 @@ And it will generate the following snapshot: exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`; ``` -Check out [React Tree Snapshot Testing](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html) for more information on snapshot testing. +Check out [React Tree Snapshot Testing](https://jestjs.io/blog/2016/07/27/jest-14.html) for more information on snapshot testing. diff --git a/website/versioned_docs/version-23.0/MoreResources.md b/website/versioned_docs/version-23.0/MoreResources.md index 4da597b97e55..cac6522e2077 100644 --- a/website/versioned_docs/version-23.0/MoreResources.md +++ b/website/versioned_docs/version-23.0/MoreResources.md @@ -22,4 +22,4 @@ You will find a number of example test cases in the [`examples`](https://github. Ask questions and find answers from other Jest users like you. [Reactiflux](http://www.reactiflux.com/) is a Discord chat where a lot of Jest discussion happens. Check out the [#jest](https://discord.gg/MWRhKCj) channel. -Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/jest/blog/) to find out what's happening in the world of Jest. +Follow the [Jest Twitter account](https://twitter.com/fbjest) and [blog](/blog/) to find out what's happening in the world of Jest. diff --git a/website/versioned_docs/version-23.0/SnapshotTesting.md b/website/versioned_docs/version-23.0/SnapshotTesting.md index bf7ca27b5c4b..de22323cd648 100644 --- a/website/versioned_docs/version-23.0/SnapshotTesting.md +++ b/website/versioned_docs/version-23.0/SnapshotTesting.md @@ -42,7 +42,7 @@ exports[`renders correctly 1`] = ` The snapshot artifact should be committed alongside code changes, and reviewed as part of your code review process. Jest uses [pretty-format](https://github.com/facebook/jest/tree/master/packages/pretty-format) to make snapshots human-readable during code review. On subsequent test runs Jest will simply compare the rendered output with the previous snapshot. If they match, the test will pass. If they don't match, either the test runner found a bug in your code that should be fixed, or the implementation has changed and the snapshot needs to be updated. -More information on how snapshot testing works and why we built it can be found on the [release blog post](https://facebook.github.io/jest/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. +More information on how snapshot testing works and why we built it can be found on the [release blog post](https://jestjs.io/blog/2016/07/27/jest-14.html). We recommend reading [this blog post](http://benmccormick.org/2016/09/19/testing-with-jest-snapshots-first-impressions/) to get a good sense of when you should use snapshot testing. We also recommend watching this [egghead video](https://egghead.io/lessons/javascript-use-jest-s-snapshot-testing-feature?pl=testing-javascript-with-jest-a36c4074) on Snapshot Testing with Jest. ### Updating Snapshots @@ -227,7 +227,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover ### What's the difference between snapshot testing and visual regression testing? -Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](http://facebook.github.io/jest/blog/2016/07/27/jest-14.html#why-snapshot-testing). +Snapshot testing and visual regression testing are two distinct ways of testing UIs, and they serve different purposes. Visual regression testing tools take screenshots of web pages and compare the resulting images pixel by pixel. With Snapshot testing values are serialized, stored within text files and compared using a diff algorithm. There are different trade-offs to consider and we listed the reasons why snapshot testing was built in the [Jest blog](https://jestjs.io/blog/2016/07/27/jest-14.html#why-snapshot-testing). ### Does snapshot testing substitute unit testing? diff --git a/website/versioned_docs/version-23.0/Troubleshooting.md b/website/versioned_docs/version-23.0/Troubleshooting.md index 67d1b019ff04..729b06fdfda8 100644 --- a/website/versioned_docs/version-23.0/Troubleshooting.md +++ b/website/versioned_docs/version-23.0/Troubleshooting.md @@ -185,7 +185,7 @@ yarn test --maxWorkers=4 ## Compatibility issues -Jest takes advantage of new features added to Node 6. We recommend that you upgrade to the latest stable release of Node. The minimum supported version is `v6.0.0`. Versions `0.x.x` and `4.x.x` are not supported because the `jsdom` version used in Jest doesn't support Node 4. However, if you need to run Jest on Node 4, you can use the `testEnvironment` config to use a [custom environment](https://facebook.github.io/jest/docs/en/configuration.html#testenvironment-string) that supports Node 4, such as [`jest-environment-node`](https://yarnpkg.com/en/package/jest-environment-node). +Jest takes advantage of new features added to Node 6. We recommend that you upgrade to the latest stable release of Node. The minimum supported version is `v6.0.0`. Versions `0.x.x` and `4.x.x` are not supported because the `jsdom` version used in Jest doesn't support Node 4. However, if you need to run Jest on Node 4, you can use the `testEnvironment` config to use a [custom environment](https://jestjs.io/docs/en/configuration.html#testenvironment-string) that supports Node 4, such as [`jest-environment-node`](https://yarnpkg.com/en/package/jest-environment-node). ## `coveragePathIgnorePatterns` seems to not have any effect. @@ -193,4 +193,4 @@ Make sure you are not using the `babel-plugin-istanbul` plugin. Jest wraps Istan ## Still unresolved? -See [Help](/jest/help.html). +See [Help](/help.html).