This config is optional - the globalSetup and globalTeardown functions ensure that the same instance of Puppeteer is shared between tests to improve performance. If you do not set these options then a new instance of Puppeteer will be launched for each test.
If you cannot configure setupFilesAfterEnv (such as in create-react-app), you can manually extend Jest in your test files using:
import{extendExpect}from'jest-component-snapshot'
extendExpect()
Image snapshot tests
Creates an image snapshot from a component using jest-image-snapshot. All of the same options are supported.
Uses Puppeteer to create an accessibility tree snapshot. The snapshot is converted to YAML for readability and empty properties and generic containers are removed.