Serializer function for converting values to snapshot strings.
A serializer takes any JavaScript value and converts it to a string representation suitable for storage in a snapshot file.
The value to serialize
String representation of the value
const serializer: SnapshotSerializer = (value) => { return JSON.stringify(value, null, 2);}; Copy
const serializer: SnapshotSerializer = (value) => { return JSON.stringify(value, null, 2);};
Serializer function for converting values to snapshot strings.
A serializer takes any JavaScript value and converts it to a string representation suitable for storage in a snapshot file.