npm run testto run everything we have.
npm run test:unitto run unit tests.
jestsnapshots to be sure that our components rendering did not change without notice. It saved us million times!
Indexcomponent, mount it to the page, then render it to string, and serialize to the text file inside
__snapshots__folder near the test itself. There can be multiple snapshots for different component states.
npm run test:unit -uto update existing snapshots with the updated state.
axios-mock-adapterto illustrate the point. You are free to use any kind of mocks you want.
svgicons. At some point
jestmight fail to load and transform them.
jest-transform-stubthat will help you in this field.
svgas fake component
jest-transform-stubwill just stub all static files with no-ops
npm auditto fail your CI when bad packages are found.