Ende.TestSnapshotOptions
interface
interface Ende.TestSnapshotOptions<T = unknown>Options which can be set when calling
Ende.TestContext.assertSnapshot.
Properties
dir
dir?: stringSnapshot output directory, relative to the directory of the test
file (or absolute). Snapshot files are written to this directory
instead of the default __snapshots__ directory. Requires read (and,
with --update-snapshots, write) permission for the directory.
If both dir and path are specified, dir is ignored.
path
path?: stringSnapshot output path, relative to the directory of the test file (or
absolute). The snapshot is stored in this file instead of the default
__snapshots__/<test file name>.snap file. Requires read (and, with
--update-snapshots, write) permission for the file.
If both dir and path are specified, dir is ignored.
name
name?: stringName of the snapshot to use in the snapshot file instead of the name derived from the test and step names.
msg
msg?: stringFailure message to use when the assertion fails, instead of the generated diff message.
serializer
serializer?: (actual: T) => stringFunction used to serialize the value to a string before comparing it
with the stored snapshot. Defaults to a Ende.inspect()-based
serializer.