Skip to content

Commit b97d0b6

Browse files
committed
docs: mention snapshot serializer
Mention snapshot serializer as a valid way to replace random strings.
1 parent d09904b commit b97d0b6

File tree

9 files changed

+9
-8
lines changed

9 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- `[docs]` Updated documentation for the `--runTestsByPath` CLI command ([#14004](https://github.com/facebook/jest/pull/14004))
2323
- `[docs]` Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable ([#14056](https://github.com/facebook/jest/pull/14056))
2424
- `[docs]` Update jest statistics of use and downloads in website Index.
25+
- `[docs]` SnapshotTesting: Additionally mention snapshot serializer in "replacing random string part" message
2526

2627
### Performance
2728

docs/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-28.x/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-29.0/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-29.1/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-29.2/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-29.3/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-29.4/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

website/versioned_docs/version-29.5/SnapshotTesting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
230230
expect(stringWithConstantData).toMatchSnapshot();
231231
```
232232

233-
Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
233+
Other ways this can be done is using the [snapshot serializer](Configuration.md#snapshotserializers-arraystring) or [mocking](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
234234

235235
:::
236236

0 commit comments

Comments
 (0)