We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60e5c07 commit a134785Copy full SHA for a134785
src/index.js
@@ -3,7 +3,7 @@ import prettierFormatter from './formatters/prettier'
3
import unstringSnapshotSerializer from './unstring-snapshot-serializer'
4
5
// istanbul ignore else (it's not worth testing)
6
-if (expect.addSnapshotSerializer) {
+if (typeof expect !== 'undefined' && expect.addSnapshotSerializer) {
7
expect.addSnapshotSerializer(unstringSnapshotSerializer)
8
}
9
0 commit comments