@@ -956,7 +956,6 @@ function. See [`assert.throws()`][] for more details.
956
956
Besides the async nature to await the completion behaves identically to
957
957
[ ` assert.doesNotThrow() ` ] [ ] .
958
958
959
- <!-- eslint-disable no-restricted-syntax -->
960
959
``` mjs
961
960
import assert from ' assert/strict' ;
962
961
@@ -981,7 +980,6 @@ const assert = require('assert/strict');
981
980
})();
982
981
```
983
982
984
- <!-- eslint-disable no-restricted-syntax -->
985
983
``` mjs
986
984
import assert from ' assert/strict' ;
987
985
@@ -991,7 +989,6 @@ assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
991
989
});
992
990
```
993
991
994
- <!-- eslint-disable no-restricted-syntax -->
995
992
``` cjs
996
993
const assert = require (' assert/strict' );
997
994
@@ -1040,7 +1037,6 @@ function. See [`assert.throws()`][] for more details.
1040
1037
The following, for instance, will throw the [ ` TypeError ` ] [ ] because there is no
1041
1038
matching error type in the assertion:
1042
1039
1043
- <!-- eslint-disable no-restricted-syntax -->
1044
1040
``` mjs
1045
1041
import assert from ' assert/strict' ;
1046
1042
@@ -1052,7 +1048,6 @@ assert.doesNotThrow(
1052
1048
);
1053
1049
```
1054
1050
1055
- <!-- eslint-disable no-restricted-syntax -->
1056
1051
``` cjs
1057
1052
const assert = require (' assert/strict' );
1058
1053
@@ -1067,7 +1062,6 @@ assert.doesNotThrow(
1067
1062
However, the following will result in an [ ` AssertionError ` ] [ ] with the message
1068
1063
'Got unwanted exception...':
1069
1064
1070
- <!-- eslint-disable no-restricted-syntax -->
1071
1065
``` mjs
1072
1066
import assert from ' assert/strict' ;
1073
1067
@@ -1079,7 +1073,6 @@ assert.doesNotThrow(
1079
1073
);
1080
1074
```
1081
1075
1082
- <!-- eslint-disable no-restricted-syntax -->
1083
1076
``` cjs
1084
1077
const assert = require (' assert/strict' );
1085
1078
@@ -1095,7 +1088,6 @@ If an [`AssertionError`][] is thrown and a value is provided for the `message`
1095
1088
parameter, the value of ` message ` will be appended to the [ ` AssertionError ` ] [ ]
1096
1089
message:
1097
1090
1098
- <!-- eslint-disable no-restricted-syntax -->
1099
1091
``` mjs
1100
1092
import assert from ' assert/strict' ;
1101
1093
@@ -1109,7 +1101,6 @@ assert.doesNotThrow(
1109
1101
// Throws: AssertionError: Got unwanted exception: Whoops
1110
1102
```
1111
1103
1112
- <!-- eslint-disable no-restricted-syntax -->
1113
1104
``` cjs
1114
1105
const assert = require (' assert/strict' );
1115
1106
@@ -2338,7 +2329,6 @@ message as the thrown error message is going to result in an
2338
2329
` ERR_AMBIGUOUS_ARGUMENT ` error. Please read the example below carefully if using
2339
2330
a string as the second argument gets considered:
2340
2331
2341
- <!-- eslint-disable no-restricted-syntax -->
2342
2332
``` mjs
2343
2333
import assert from ' assert/strict' ;
2344
2334
@@ -2375,7 +2365,6 @@ assert.throws(throwingFirst, /Second$/);
2375
2365
// AssertionError [ERR_ASSERTION]
2376
2366
```
2377
2367
2378
- <!-- eslint-disable no-restricted-syntax -->
2379
2368
``` cjs
2380
2369
const assert = require (' assert/strict' );
2381
2370
0 commit comments