Optional
cleanOptional
compareOptional
formatFunction used to serialize snapshotted objects to a string. If a non-string is returned, then the default formatting will be used, so this can also transform the object, if needed.
Optional
snapshotthe "file" used to store snapshots. Defaults to a filename based on the test file name and arguments, in ./tap-snapshots. Specifying the same filename will result in getting the same SnapshotProvider.
Optional
snapshotClass to use to store and load snapshot data. Defaults to SnapshotProviderDefault, which writes to files in ./tap-snapshots There's no hard requirement that "file" be a file on disk of course. Could easily be in a database, localStorage, whatever.
Optional
writewhether or not to write the snapshot file. Defaults true if TAP_SNAPSHOT=1 in the environment.
Function called on the string snapshot result, can be used to remove changeable data, platform-specific stuff, etc.