Const
Generate snapshot files for t.matchSnapshot()
assertions.
Defaults to true if the TAP_SNAPSHOT
environment variable is set to
1
, or if the npm_lifecycle_event
environment variable is set to
either snap
or snapshot
.
That is, if you put "scripts": { "snap": "tap" }
in your package.json
file, then npm run snap
will generate snapshots.
Automatically clean the current working directory out of snapshot data, replacing it with a token.
This helps prevent frustrating "works on my machine" when tests capture an error message or file path, but then fail when run on any other system, and so is enabled by default.`,
Do not automatically clean the current working directory out of snapshot data, replacing it with a token.
May be required when using fixtures or other snapshot data sources that intentionally include strings which happen to match the current working directory.
Not recommended! It's better to leave this protection on, and edit your fixtures so that they do not include the cwd.