@@ -958,7 +958,6 @@ function. See [`assert.throws()`][] for more details.
958
958
Besides the async nature to await the completion behaves identically to
959
959
[ ` assert.doesNotThrow() ` ] [ ] .
960
960
961
- <!-- eslint-disable no-restricted-syntax -->
962
961
``` mjs
963
962
import assert from ' assert/strict' ;
964
963
@@ -983,7 +982,6 @@ const assert = require('assert/strict');
983
982
})();
984
983
```
985
984
986
- <!-- eslint-disable no-restricted-syntax -->
987
985
``` mjs
988
986
import assert from ' assert/strict' ;
989
987
@@ -993,7 +991,6 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
993
991
});
994
992
```
995
993
996
- <!-- eslint-disable no-restricted-syntax -->
997
994
``` cjs
998
995
const assert = require (' assert/strict' );
999
996
@@ -1042,7 +1039,6 @@ function. See [`assert.throws()`][] for more details.
1042
1039
The following, for instance, will throw the [ ` TypeError ` ] [ ] because there is no
1043
1040
matching error type in the assertion:
1044
1041
1045
- <!-- eslint-disable no-restricted-syntax -->
1046
1042
``` mjs
1047
1043
import assert from ' assert/strict' ;
1048
1044
@@ -1054,7 +1050,6 @@ assert.doesNotThrow(
1054
1050
);
1055
1051
```
1056
1052
1057
- <!-- eslint-disable no-restricted-syntax -->
1058
1053
``` cjs
1059
1054
const assert = require (' assert/strict' );
1060
1055
@@ -1069,7 +1064,6 @@ assert.doesNotThrow(
1069
1064
However, the following will result in an [ ` AssertionError ` ] [ ] with the message
1070
1065
'Got unwanted exception...':
1071
1066
1072
- <!-- eslint-disable no-restricted-syntax -->
1073
1067
``` mjs
1074
1068
import assert from ' assert/strict' ;
1075
1069
@@ -1081,7 +1075,6 @@ assert.doesNotThrow(
1081
1075
);
1082
1076
```
1083
1077
1084
- <!-- eslint-disable no-restricted-syntax -->
1085
1078
``` cjs
1086
1079
const assert = require (' assert/strict' );
1087
1080
@@ -1097,7 +1090,6 @@ If an [`AssertionError`][] is thrown and a value is provided for the `message`
1097
1090
parameter, the value of ` message ` will be appended to the [ ` AssertionError ` ] [ ]
1098
1091
message:
1099
1092
1100
- <!-- eslint-disable no-restricted-syntax -->
1101
1093
``` mjs
1102
1094
import assert from ' assert/strict' ;
1103
1095
@@ -1111,7 +1103,6 @@ assert.doesNotThrow(
1111
1103
// Throws: AssertionError: Got unwanted exception: Whoops
1112
1104
```
1113
1105
1114
- <!-- eslint-disable no-restricted-syntax -->
1115
1106
``` cjs
1116
1107
const assert = require (' assert/strict' );
1117
1108
@@ -2346,7 +2337,6 @@ message as the thrown error message is going to result in an
2346
2337
` ERR_AMBIGUOUS_ARGUMENT ` error. Please read the example below carefully if using
2347
2338
a string as the second argument gets considered:
2348
2339
2349
- <!-- eslint-disable no-restricted-syntax -->
2350
2340
``` mjs
2351
2341
import assert from ' assert/strict' ;
2352
2342
@@ -2383,7 +2373,6 @@ assert.throws(throwingFirst, /Second$/);
2383
2373
// AssertionError [ERR_ASSERTION]
2384
2374
```
2385
2375
2386
- <!-- eslint-disable no-restricted-syntax -->
2387
2376
``` cjs
2388
2377
const assert = require (' assert/strict' );
2389
2378
0 commit comments