Skip to content

Commit

Permalink
chore(website): cleanup more links (#11265)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 2, 2021
1 parent 0f2da04 commit 4926564
Show file tree
Hide file tree
Showing 18 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Expand Up @@ -12,6 +12,6 @@ about: If you have questions, please check Reactiflux or StackOverflow

For questions or help please see:

- [The Jest help page](https://jestjs.io/en/help.html)
- [The Jest help page](https://jestjs.io/help)
- [Our `#testing` channel in Reactiflux](https://discord.gg/j6FKKQQrW9)
- The [jestjs](https://stackoverflow.com/questions/tagged/jestjs) tag on [StackOverflow](https://stackoverflow.com/questions/ask)
4 changes: 2 additions & 2 deletions CHANGELOG.md
Expand Up @@ -2272,7 +2272,7 @@ We skipped 24.2.0 because a draft was accidentally published. Please use `24.3.0

## jest 18.0.0

See https://jestjs.io/blog/2016/12/15/2016-in-jest.html
See https://jestjs.io/blog/2016/12/15/2016-in-jest

- The testResultsProcessor function is now required to return the modified results.
- Removed `pit` and `mockImpl`. Use `it` or `mockImplementation` instead.
Expand Down Expand Up @@ -2409,7 +2409,7 @@ See https://jestjs.io/blog/2016/12/15/2016-in-jest.html

## jest 15.0.0

- See https://jestjs.io/blog/2016/09/01/jest-15.html
- See https://jestjs.io/blog/2016/09/01/jest-15
- 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.
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/__snapshots__/customReporters.test.ts.snap
Expand Up @@ -115,7 +115,7 @@ exports[`Custom Reporters Integration invalid format for adding reporters 1`] =
]
Configuration Documentation:
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;
Expand Down
Expand Up @@ -9,7 +9,7 @@ exports[`show error message when no js moduleFileExtensions 1`] = `
Please change your configuration to include 'js'.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;

Expand Down
4 changes: 2 additions & 2 deletions packages/jest-changed-files/README.md
Expand Up @@ -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://jestjs.io/docs/configuration.html#roots-array-string).
roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration#roots-array-string).

options: Object literal with keys

Expand All @@ -29,7 +29,7 @@ Get a set of git and hg repositories.

#### Parameters

roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration.html#roots-array-string).
roots: Array of string paths gathered from [jest roots](https://jestjs.io/docs/configuration#roots-array-string).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/README.md
Expand Up @@ -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](https://jestjs.io/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) of React trees or other serializable values to simplify UI testing.

Read More: https://jestjs.io/
Expand Up @@ -13,7 +13,7 @@ exports[`Upgrade help logs a warning when \`scriptPreprocessor\` and/or \`prepro
<yellow> Please update your configuration.</>
<yellow></>
<yellow> <bold>Configuration Documentation:</></>
<yellow> https://jestjs.io/docs/configuration.html</>
<yellow> https://jestjs.io/docs/configuration</>
<yellow></>"
`;
Expand All @@ -39,7 +39,7 @@ exports[`displayName should throw an error when displayName is is an empty objec
<red></>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -55,7 +55,7 @@ exports[`displayName should throw an error when displayName is missing color 1`]
<red></>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -71,7 +71,7 @@ exports[`displayName should throw an error when displayName is missing name 1`]
<red></>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -87,7 +87,7 @@ exports[`displayName should throw an error when displayName is using invalid val
<red></>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -98,7 +98,7 @@ exports[`extensionsToTreatAsEsm should enforce leading dots 1`] = `
Please change your configuration to extensionsToTreatAsEsm: ['.ts'].
Configuration Documentation:
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;
exports[`extensionsToTreatAsEsm throws on .cjs 1`] = `
Expand All @@ -107,7 +107,7 @@ exports[`extensionsToTreatAsEsm throws on .cjs 1`] = `
Option: extensionsToTreatAsEsm: ['.cjs'] includes '.cjs' which is always treated as CommonJS.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;
exports[`extensionsToTreatAsEsm throws on .js 1`] = `
Expand All @@ -116,7 +116,7 @@ exports[`extensionsToTreatAsEsm throws on .js 1`] = `
Option: extensionsToTreatAsEsm: ['.js'] includes '.js' which is always inferred based on type in its nearest package.json.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;
exports[`extensionsToTreatAsEsm throws on .mjs 1`] = `
Expand All @@ -125,7 +125,7 @@ exports[`extensionsToTreatAsEsm throws on .mjs 1`] = `
Option: extensionsToTreatAsEsm: ['.mjs'] includes '.mjs' which is always treated as an ECMAScript Module.
Configuration Documentation:
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;
exports[`preset throws when module was found but no "jest-preset.js" or "jest-preset.json" files 1`] = `
Expand All @@ -134,7 +134,7 @@ exports[`preset throws when module was found but no "jest-preset.js" or "jest-pr
<red> Module <bold>exist-but-no-jest-preset</> should have \\"jest-preset.js\\" or \\"jest-preset.json\\" file at the root.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -144,7 +144,7 @@ exports[`preset throws when preset not found 1`] = `
<red> Preset <bold>doesnt-exist</> not found.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -154,7 +154,7 @@ exports[`rootDir throws if the options is missing a rootDir property 1`] = `
<red> Configuration option <bold>rootDir</> must be specified.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -164,7 +164,7 @@ exports[`runner throw error when a runner is not found 1`] = `
<red> Jest Runner <bold>missing-runner</> cannot be found. Make sure the <bold>runner</> configuration option points to an existing node module.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -176,7 +176,7 @@ exports[`setupTestFrameworkScriptFile logs a deprecation warning when \`setupTes
<yellow> Please update your configuration.</>
<yellow></>
<yellow> <bold>Configuration Documentation:</></>
<yellow> https://jestjs.io/docs/configuration.html</>
<yellow> https://jestjs.io/docs/configuration</>
<yellow></>"
`;
Expand All @@ -187,7 +187,7 @@ exports[`setupTestFrameworkScriptFile logs an error when \`setupTestFrameworkScr
<red> Please change your configuration to only use <bold>setupFilesAfterEnv</>.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -197,7 +197,7 @@ exports[`testEnvironment throws on invalid environment names 1`] = `
<red> Test environment <bold>phantom</> cannot be found. Make sure the <bold>testEnvironment</> configuration option points to an existing node module.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -207,7 +207,7 @@ exports[`testMatch throws if testRegex and testMatch are both specified 1`] = `
<red> Configuration options <bold>testMatch</> and <bold>testRegex</> cannot be used together.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -221,7 +221,7 @@ exports[`testTimeout should throw an error if timeout is a negative number 1`] =
<red> Option \\"<bold>testTimeout</>\\" must be a natural number.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
Expand All @@ -231,6 +231,6 @@ exports[`watchPlugins throw error when a watch plugin is not found 1`] = `
<red> Watch plugin <bold>missing-plugin</> cannot be found. Make sure the <bold>watchPlugins</> configuration option points to an existing node module.</>
<red></>
<red> <bold>Configuration Documentation:</></>
<red> https://jestjs.io/docs/configuration.html</>
<red> https://jestjs.io/docs/configuration</>
<red></>"
`;
2 changes: 1 addition & 1 deletion packages/jest-config/src/utils.ts
Expand Up @@ -22,7 +22,7 @@ export const BULLET: string = chalk.bold('\u25cf ');
export const DOCUMENTATION_NOTE = ` ${chalk.bold(
'Configuration Documentation:',
)}
https://jestjs.io/docs/configuration.html
https://jestjs.io/docs/configuration
`;

const createValidationError = (message: string) =>
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-core/src/getNoTestFoundVerbose.ts
Expand Up @@ -43,7 +43,7 @@ export default function getNoTestFoundVerbose(
`Make sure Jest's configuration does not exclude this directory.` +
`\nTo set up Jest, make sure a package.json file exists.\n` +
`Jest Documentation: ` +
`facebook.github.io/jest/docs/configuration.html`;
`https://jestjs.io/docs/configuration`;
});
let dataMessage;

Expand Down
Expand Up @@ -3,5 +3,5 @@
exports[`FakeTimers runAllTimers warns when trying to advance timers while real timers are used 1`] = `
A function to advance timers was called but the timers API is not mocked with fake timers. Call \`jest.useFakeTimers()\` in this test or enable fake timers globally by setting \`"timers": "fake"\` in the configuration file. This warning is likely a result of a default configuration change in Jest 15.
Release Blog Post: https://jestjs.io/blog/2016/09/01/jest-15.html
Release Blog Post: https://jestjs.io/blog/2016/09/01/jest-15
`;
2 changes: 1 addition & 1 deletion packages/jest-fake-timers/src/legacyFakeTimers.ts
Expand Up @@ -356,7 +356,7 @@ export default class FakeTimers<TimerRef> {
`\`"timers": "fake"\` in ` +
`the configuration file. This warning is likely a result of a ` +
`default configuration change in Jest 15.\n\n` +
`Release Blog Post: https://jestjs.io/blog/2016/09/01/jest-15.html\n` +
`Release Blog Post: https://jestjs.io/blog/2016/09/01/jest-15\n` +
`Stack Trace:\n` +
formatStackTrace(new Error().stack!, this._config, {
noStackTrace: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-runtime/src/index.ts
Expand Up @@ -1463,7 +1463,7 @@ export default class Runtime {
if (mockMetadata == null) {
throw new Error(
`Failed to get mock metadata: ${modulePath}\n\n` +
`See: https://jestjs.io/docs/manual-mocks.html#content`,
`See: https://jestjs.io/docs/manual-mocks#content`,
);
}
this._mockMetaDataCache.set(modulePath, mockMetadata);
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-snapshot/src/SnapshotResolver.ts
Expand Up @@ -97,7 +97,7 @@ function mustImplement(propName: string, requiredType: string) {
chalk.bold(
`Custom snapshot resolver must implement a \`${propName}\` as a ${requiredType}.`,
) +
'\nDocumentation: https://facebook.github.io/jest/docs/configuration.html#snapshotResolver'
'\nDocumentation: https://jestjs.io/docs/configuration#snapshotresolver-string'
);
}

Expand Down
Expand Up @@ -4,15 +4,15 @@ exports[`malformed custom resolver in project config inconsistent functions thro
exports[`malformed custom resolver in project config missing resolveSnapshotPath throws 1`] = `
"<bold>Custom snapshot resolver must implement a \`resolveSnapshotPath\` as a function.</>
Documentation: https://facebook.github.io/jest/docs/configuration.html#snapshotResolver"
Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string"
`;
exports[`malformed custom resolver in project config missing resolveTestPath throws 1`] = `
"<bold>Custom snapshot resolver must implement a \`resolveTestPath\` as a function.</>
Documentation: https://facebook.github.io/jest/docs/configuration.html#snapshotResolver"
Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string"
`;
exports[`malformed custom resolver in project config missing testPathForConsistencyCheck throws 1`] = `
"<bold>Custom snapshot resolver must implement a \`testPathForConsistencyCheck\` as a string.</>
Documentation: https://facebook.github.io/jest/docs/configuration.html#snapshotResolver"
Documentation: https://jestjs.io/docs/configuration#snapshotresolver-string"
`;
2 changes: 1 addition & 1 deletion packages/jest/README.md
Expand Up @@ -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](https://jestjs.io/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) of React trees or other serializable values to simplify UI testing.

Read More: https://jestjs.io/
2 changes: 1 addition & 1 deletion website/versioned_docs/version-25.x/ExpectAPI.md
Expand Up @@ -1286,7 +1286,7 @@ And it will generate the following snapshot:
exports[`drinking flavors throws on octopus 1`] = `"yuck, octopus flavor"`;
```

Check out [React Tree Snapshot Testing](https://jestjs.io/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) for more information on snapshot testing.

### `.toThrowErrorMatchingInlineSnapshot(inlineSnapshot)`

Expand Down
4 changes: 2 additions & 2 deletions website/versioned_docs/version-25.x/SnapshotTesting.md
Expand Up @@ -43,7 +43,7 @@ The snapshot artifact should be committed alongside code changes, and reviewed a

> Note: The snapshot is directly scoped to the data you render – in our example the `<Link />` component with `page` prop passed to it. This implies that even if any other file has missing props (Say, `App.js`) in the `<Link />` component, it will still pass the test as the test doesn't know the usage of `<Link />` component and it's scoped only to the `Link.react.js`. Also, Rendering the same component with different props in other snapshot tests will not affect the first one, as the tests don't know about each other.
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.
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). 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

Expand Down Expand Up @@ -295,7 +295,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](https://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#why-snapshot-testing).

### Does snapshot testing replace unit testing?

Expand Down

0 comments on commit 4926564

Please sign in to comment.