Asserts a string matches a snapshot saved in a file. An environment variable can be used to save rather than assert snapshots.
MIT License
Bot releases are visible (Hide)
^14.17.0 || ^16.0.0 || >= 18.0.0
.main
field.node:
URL scheme for Node.js builtin module imports.fs
to node:fs/promises
.jsconfig.json
:
compilerOptions.maxNodeModuleJsDepth
to 10
.compilerOptions.module
to nodenext
.actions/checkout
to v3.actions/setup-node
to v3.Published by jaydenseric over 2 years ago
jsdoc-md
dev dependency and the related package scripts, replacing the readme “API” section with manually written “Examples” and “Exports” sections.jsconfig.json
to disable TypeScript automatic type acquisition for the project.license.md
MIT License file.Published by jaydenseric almost 3 years ago
@types/node
from package devDependencies
to dependencies
, using *
for the version.Published by jaydenseric almost 3 years ago
^12.22.0 || ^14.17.0 || >= 16.0.0
../package
from the package exports
field; the full package.json
filename must be used in a require
path.index.mjs
to assertSnapshot.mjs
and added it to the package exports
field.snapshot
to assertSnapshot
.assertSnapshot
argument 2 snapshotFilePath
to snapshotFile
, and allow it to also be a file URL
instance.docs-check
script that checks the readme API docs are up to date with the source JSDoc.types
script.singleQuote
to the default, false
.Published by jaydenseric over 3 years ago
^12.20 || >= 14.13
.exports
field..mjs
files instead of CJS in .js
files, accessible via import
but not require
.sideEffects
field.hard-rejection
to detect unhandled Promise
rejections in tests, as Node.js v15+ does this natively.jsdoc-md
v10 automatically generates a Prettier formatted readme.actions/checkout
to v2.actions/setup-node
to v2.CI
environment variable as it’s set by default.Promise.all
for faster tests.Published by jaydenseric almost 4 years ago
^10.17.0 || ^12.0.0 || >= 13.7.0
.npm install-test
command.prepare:prettier
and test:prettier
scripts.semi
to the default, true
.npm-debug.log
from the .gitignore
file as npm v4.2.0+ doesn’t create it in the current working directory..editorconfig
comment URL.snapshot
function code example.import
and require
the snapshot
function.Published by jaydenseric almost 5 years ago
Initial release.