What is the practical use of Jest's snapshot testing?

What is the practical use of

Jest"s snapshot testing?

Nov.22,2021

is used for comparison. If you thought ok was something, save a snapshot and compare it to the next test


is so useful.

it is an effective supplement to your unit tests and is not a substitute for anything. Of course, your project has no unit tests at all, so adding a snapshot of
is a bit guaranteed.

you can take a look at the unit test of antd, which migrates snapshot of jest a long time ago

Menu