Skip to content

Commit

Permalink
docs: mention snapshot serializer
Browse files Browse the repository at this point in the history
Mention snapshot serializer as a valid way to replace random strings.
  • Loading branch information
maro1993 committed Jun 22, 2023
1 parent d09904b commit b97d0b6
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- `[docs]` Updated documentation for the `--runTestsByPath` CLI command ([#14004](https://github.com/facebook/jest/pull/14004))
- `[docs]` Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable ([#14056](https://github.com/facebook/jest/pull/14056))
- `[docs]` Update jest statistics of use and downloads in website Index.
- `[docs]` SnapshotTesting: Additionally mention snapshot serializer in "replacing random string part" message

### Performance

Expand Down
2 changes: 1 addition & 1 deletion docs/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-28.x/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.0/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.1/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.2/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.3/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.4/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-29.5/SnapshotTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ const stringWithConstantData = stringWithRandomData.replace(/id="\d+"/, 123);
expect(stringWithConstantData).toMatchSnapshot();
```

Another way is to [mock](MockFunctions.md) the library responsible for generating the random part of the code you're snapshotting.
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.

:::

Expand Down

0 comments on commit b97d0b6

Please sign in to comment.