Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toMatchSnapshotWithGlamor(...args) {
const result = toMatchSnapshot.apply(this, args)
let message
if (!result.pass) {
message = diff(result.expected, result.actual, {
aAnnotation: 'Snapshot',
bAnnotation: 'Received',
})
message = stripAnsi(message)
message = colorize(message)
}
return {pass: result.pass, message}
},
}