Added inline snapshots to Jest

This commit is contained in:
Jacob Herper 2020-05-05 10:25:10 +01:00 committed by GitHub
parent cb4e03077f
commit 6da706b706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -115,8 +115,12 @@ See: [expect()](http://facebook.github.io/jest/docs/en/expect.html#expectvalue)
```js ```js
expect(value) expect(value)
.toMatchSnapshot() .toMatchSnapshot()
.toMatchInlineSnapshot()
``` ```
Note that `toMatchInlineSnapshot() requires Prettier to be set up for the project.
See: [Inline Snapshots](https://jestjs.io/docs/en/snapshot-testing#inline-snapshots)
### Errors ### Errors
```js ```js