Skip to content

Commit 0f66444

Browse files
Simoncpojer
Simon
authored andcommitted
docs: Update broken test links (#3914)
The links to the tests were written as something-test.js, but it need to be something.test.js
1 parent 5577ece commit 0f66444

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/en/SnapshotTesting.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A typical snapshot test case for a mobile app renders a UI component, takes a sc
1313

1414
## Snapshot Testing with Jest
1515

16-
A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/master/examples/snapshot/__tests__/Link.react-test.js) for a simple [Link component](https://github.com/facebook/jest/blob/master/examples/snapshot/Link.react.js):
16+
A similar approach can be taken when it comes to testing your React components. Instead of rendering the graphical UI, which would require building the entire app, you can use a test renderer to quickly generate a serializable value for your React tree. Consider this [example test](https://github.com/facebook/jest/blob/master/examples/snapshot/__tests__/link.react.test.js) for a simple [Link component](https://github.com/facebook/jest/blob/master/examples/snapshot/Link.react.js):
1717

1818
```javascript
1919
import React from 'react';
@@ -28,7 +28,7 @@ it('renders correctly', () => {
2828
});
2929
```
3030

31-
The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/master/examples/snapshot/__tests__/__snapshots__/Link.react-test.js.snap) that looks like this:
31+
The first time this test is run, Jest creates a [snapshot file](https://github.com/facebook/jest/blob/master/examples/snapshot/__tests__/__snapshots__/link.react.test.js.snap) that looks like this:
3232

3333
```javascript
3434
exports[`renders correctly 1`] = `
@@ -105,7 +105,7 @@ Yes, all snapshot files should be committed alongside the modules they are cover
105105

106106
### Does snapshot testing only work with React components?
107107

108-
[React](/jest/docs/tutorial-react.html) and [React Native](/jest/docs/tutorial-react-native.html) components are a good use case for snapshot testing. However, snapshots can capture any serializable value and should be used anytime the goal is testing whether the output is correct. The Jest repository contains many examples of testing the output of Jest itself, the output of Jest's assertion library as well as log messages from various parts of the Jest codebase. See and example of [snapshotting CLI output](https://github.com/facebook/jest/blob/master/integration_tests/__tests__/console-test.js) in the Jest repo.
108+
[React](/jest/docs/tutorial-react.html) and [React Native](/jest/docs/tutorial-react-native.html) components are a good use case for snapshot testing. However, snapshots can capture any serializable value and should be used anytime the goal is testing whether the output is correct. The Jest repository contains many examples of testing the output of Jest itself, the output of Jest's assertion library as well as log messages from various parts of the Jest codebase. See and example of [snapshotting CLI output](https://github.com/facebook/jest/blob/master/integration_tests/__tests__/console.test.js) in the Jest repo.
109109

110110
### What's the difference between snapshot testing and visual regression testing?
111111

0 commit comments

Comments
 (0)