Jest snapshot serializer for JSS
This adds the styles generated by JSS to your snapshots, so you can detect unwanted style changes using snapshots.
npm install --save-dev jss-snapshot-serializerTo use the serializer globally for all your tests put the following option to your Jest config:
{ snapshotSerializers: ['jss-snapshot-serializer'] }Alternatively, you can add the serializer to a specific test file like this:
import jssSerializer from 'jss-snapshot-serializer'; expect.addSnapshotSerializer(jssSerializer);