November 2017
Beginner to intermediate
398 pages
8h 42m
English
If you modify a component, there is a chances that its HTML render will change too. This means its snapshots will no longer be valid and the Jest tests will fail. Fortunately, the jest command has a --updateSnapshots argument. When used, all the failing snapshots will be resaved and will pass.
"jest:update": "jest --updateSnapshot"

npm run jest:update ...
Read now
Unlock full access