assert: add assert.Snapshot

PR-URL: https://github.com/nodejs/node/pull/44095
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
Moshe Atlow 2022-08-11 16:07:52 +03:00 committed by GitHub
parent 818bd6cb4d
commit 8f9d1ab5ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 380 additions and 0 deletions

View file

@ -1052,6 +1052,9 @@ assert.doesNotMatch = function doesNotMatch(string, regexp, message) {
assert.CallTracker = CallTracker;
const snapshot = require('internal/assert/snapshot');
assert.snapshot = snapshot;
/**
* Expose a strict only variant of assert.
* @param {...any} args