@@ -958,7 +958,6 @@ function. See [`assert.throws()`][] for more details.
958958Besides the async nature to await the completion behaves identically to
959959[ ` assert.doesNotThrow() ` ] [ ] .
960960
961- <!-- eslint-disable no-restricted-syntax -->
962961``` mjs
963962import assert from ' assert/strict' ;
964963
@@ -983,7 +982,6 @@ const assert = require('assert/strict');
983982})();
984983```
985984
986- <!-- eslint-disable no-restricted-syntax -->
987985``` mjs
988986import assert from ' assert/strict' ;
989987
@@ -993,7 +991,6 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
993991 });
994992```
995993
996- <!-- eslint-disable no-restricted-syntax -->
997994``` cjs
998995const assert = require (' assert/strict' );
999996
@@ -1042,7 +1039,6 @@ function. See [`assert.throws()`][] for more details.
10421039The following, for instance, will throw the [ ` TypeError ` ] [ ] because there is no
10431040matching error type in the assertion:
10441041
1045- <!-- eslint-disable no-restricted-syntax -->
10461042``` mjs
10471043import assert from ' assert/strict' ;
10481044
@@ -1054,7 +1050,6 @@ assert.doesNotThrow(
10541050);
10551051```
10561052
1057- <!-- eslint-disable no-restricted-syntax -->
10581053``` cjs
10591054const assert = require (' assert/strict' );
10601055
@@ -1069,7 +1064,6 @@ assert.doesNotThrow(
10691064However, the following will result in an [ ` AssertionError ` ] [ ] with the message
10701065'Got unwanted exception...':
10711066
1072- <!-- eslint-disable no-restricted-syntax -->
10731067``` mjs
10741068import assert from ' assert/strict' ;
10751069
@@ -1081,7 +1075,6 @@ assert.doesNotThrow(
10811075);
10821076```
10831077
1084- <!-- eslint-disable no-restricted-syntax -->
10851078``` cjs
10861079const assert = require (' assert/strict' );
10871080
@@ -1097,7 +1090,6 @@ If an [`AssertionError`][] is thrown and a value is provided for the `message`
10971090parameter, the value of ` message ` will be appended to the [ ` AssertionError ` ] [ ]
10981091message:
10991092
1100- <!-- eslint-disable no-restricted-syntax -->
11011093``` mjs
11021094import assert from ' assert/strict' ;
11031095
@@ -1111,7 +1103,6 @@ assert.doesNotThrow(
11111103// Throws: AssertionError: Got unwanted exception: Whoops
11121104```
11131105
1114- <!-- eslint-disable no-restricted-syntax -->
11151106``` cjs
11161107const assert = require (' assert/strict' );
11171108
@@ -2346,7 +2337,6 @@ message as the thrown error message is going to result in an
23462337` ERR_AMBIGUOUS_ARGUMENT ` error. Please read the example below carefully if using
23472338a string as the second argument gets considered:
23482339
2349- <!-- eslint-disable no-restricted-syntax -->
23502340``` mjs
23512341import assert from ' assert/strict' ;
23522342
@@ -2383,7 +2373,6 @@ assert.throws(throwingFirst, /Second$/);
23832373// AssertionError [ERR_ASSERTION]
23842374```
23852375
2386- <!-- eslint-disable no-restricted-syntax -->
23872376``` cjs
23882377const assert = require (' assert/strict' );
23892378
0 commit comments