Skip to content

Commit

Permalink
docs: add vue snapshot section in migration guide (#1265)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed May 8, 2022
1 parent 336e4af commit 5750cf0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/guide/migration.md
Expand Up @@ -38,3 +38,16 @@ From Vitest v0.10.0, the callback style of declaring tests is deprecated. You ca
- })
+ }))
```

**Vue Snapshots**

This is not a Jest specific feature, but if you previously were using Jest with vue-cli preset, you will need to install [`jest-serializer-vue`](https://github.com/eddyerburgh/jest-serializer-vue) package, and use it inside [setupFiles](/config/#setupfiles):

```ts
import vueSnapshotSerializer from 'jest-serializer-vue'

// Add Snapshot Serializer
expect.addSnapshotSerializer(vueSnapshotSerializer)
```

Otherwise your snapshots will have a lot of escaped `"` characters.

0 comments on commit 5750cf0

Please sign in to comment.