Files
2026-05-11 17:46:13 +02:00

17 lines
362 B
TypeScript

import { SnapshotSerializer } from 'vitest'
export default {
serialize(val, config, indentation, depth, refs, printer) {
return `Pretty bar: ${printer(
val.bar,
config,
indentation,
depth,
refs,
)}`
},
test(val) {
return val && Object.prototype.hasOwnProperty.call(val, 'bar')
},
} satisfies SnapshotSerializer