@@ -2093,48 +2093,6 @@ argument, then `error` is assumed to be omitted and the string will be used for
20932093example in [ ` assert.throws() ` ] [ ]  carefully if using a string as the second
20942094argument gets considered.
20952095
2096- ## ` assert.snapshot(value, name) `  
2097- 
2098- <!--  YAML
2099- added: v18.8.0 
2100- --> 
2101- 
2102- >  Stability: 1 - Experimental
2103- 
2104- *  ` value `  {any} the value to snapshot.
2105- *  ` name `  {string} the name of the snapshot.
2106- *  Returns: {Promise}
2107- 
2108- Reads the ` name `  snapshot from a file and compares ` value `  to the snapshot.
2109- ` value `  is serialized with [ ` util.inspect() ` ] [ ] . If the value is not strictly
2110- equal to the snapshot, ` assert.snapshot() `  returns a rejected ` Promise `  with an
2111- [ ` AssertionError ` ] [ ] .
2112- 
2113- The snapshot filename uses the same basename as the application's main
2114- entrypoint with a ` .snapshot `  extension. If the snapshot file does not exist,
2115- it is created. The [ ` --update-assert-snapshot ` ] [ ]  command line flag can be used
2116- to force the update of an existing snapshot.
2117- 
2118- ``` mjs 
2119- import  assert  from  ' node:assert/strict'  ;
2120- 
2121- //  Assuming that the application's main entrypoint is app.mjs, this reads the
2122- //  'snapshotName' snapshot from app.snapshot and strictly compares its value
2123- //  to `util.inspect('value')`.
2124- await  assert .snapshot (' value'  , ' snapshotName'  );
2125- ``` 
2126- 
2127- ``` cjs 
2128- const  assert  =  require (' node:assert/strict'  );
2129- 
2130- (async  () =>  {
2131-   //  Assuming that the application's main entrypoint is app.js, this reads the
2132-   //  'snapshotName' snapshot from app.snapshot and strictly compares its value
2133-   //  to `util.inspect('value')`.
2134-   await  assert .snapshot (' value'  , ' snapshotName'  );
2135- })();
2136- ``` 
2137- 
21382096## ` assert.strictEqual(actual, expected[, message]) `  
21392097
21402098<!--  YAML
@@ -2571,7 +2529,6 @@ argument.
25712529[ Object wrappers ] : https://developer.mozilla.org/en-US/docs/Glossary/Primitive#Primitive_wrapper_objects_in_JavaScript 
25722530[ Object.prototype.toString() ] : https://tc39.github.io/ecma262/#sec-object.prototype.tostring 
25732531[ `!=` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Inequality 
2574- [ `--update-assert-snapshot` ] : cli.md#--update-assert-snapshot 
25752532[ `===` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Strict_equality 
25762533[ `==` operator ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality 
25772534[ `AssertionError` ] : #class-assertassertionerror 
@@ -2603,6 +2560,5 @@ argument.
26032560[ `process.on('exit')` ] : process.md#event-exit 
26042561[ `tracker.calls()` ] : #trackercallsfn-exact 
26052562[ `tracker.verify()` ] : #trackerverify 
2606- [ `util.inspect()` ] : util.md#utilinspectobject-options 
26072563[ enumerable "own" properties ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties 
26082564[ prototype-spec ] : https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots 
0 commit comments