Skip to content

Commit 04deffc

Browse files
Copilothi-ogawa
andcommitted
docs: update pretty-format references to @vitest/pretty-format
Co-authored-by: hi-ogawa <[email protected]>
1 parent 4e6f0d7 commit 04deffc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/config/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ Will call [`vi.unstubAllGlobals`](/api/vi#vi-unstuballglobals) before each test.
16601660

16611661
- **Type:** `PrettyFormatOptions`
16621662

1663-
Format options for snapshot testing. These options are passed down to our fork of [`pretty-format`](https://www.npmjs.com/package/pretty-format). In addition to the `pretty-format` options we support `printShadowRoot: boolean`.
1663+
Format options for snapshot testing. These options are passed down to our fork of [`@vitest/pretty-format`](https://www.npmjs.com/package/@vitest/pretty-format). In addition to the `@vitest/pretty-format` options we support `printShadowRoot: boolean`.
16641664

16651665
::: tip
16661666
Beware that `plugins` field on this object will be ignored.

docs/guide/snapshot.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Pretty foo: Object {
192192
}
193193
```
194194

195-
We are using Jest's `pretty-format` for serializing snapshots. You can read more about it here: [pretty-format](https://github.com/facebook/jest/blob/main/packages/pretty-format/README.md#serialize).
195+
We are using our fork of `pretty-format` for serializing snapshots. You can read more about it here: [@vitest/pretty-format](https://www.npmjs.com/package/@vitest/pretty-format).
196196

197197
## Difference from Jest
198198

@@ -209,7 +209,7 @@ This does not really affect the functionality but might affect your commit diff
209209

210210
#### 2. `printBasicPrototype` is default to `false`
211211

212-
Both Jest and Vitest's snapshots are powered by [`pretty-format`](https://github.com/facebook/jest/blob/main/packages/pretty-format). In Vitest we set `printBasicPrototype` default to `false` to provide a cleaner snapshot output, while in Jest <29.0.0 it's `true` by default.
212+
Both Jest and Vitest's snapshots are powered by `pretty-format`. Vitest uses its own fork [`@vitest/pretty-format`](https://www.npmjs.com/package/@vitest/pretty-format). In Vitest we set `printBasicPrototype` default to `false` to provide a cleaner snapshot output, while in Jest <29.0.0 it's `true` by default.
213213

214214
```ts
215215
import { expect, test } from 'vitest'

0 commit comments

Comments
 (0)