From 6da706b70678cdbac9a41177ff661063a3ba607a Mon Sep 17 00:00:00 2001 From: Jacob Herper Date: Tue, 5 May 2020 10:25:10 +0100 Subject: [PATCH] Added inline snapshots to Jest --- jest.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jest.md b/jest.md index e02d1f6ae..5052ec17d 100644 --- a/jest.md +++ b/jest.md @@ -115,8 +115,12 @@ See: [expect()](http://facebook.github.io/jest/docs/en/expect.html#expectvalue) ```js expect(value) .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 ```js