@@ -876,9 +876,7 @@ Use this option to have Mocha check for global variables that are leaked while r
876
876
877
877
### ` --dry-run `
878
878
879
- > _ New in v9.0.0._
880
-
881
- Report tests without executing any of them, neither tests nor hooks.
879
+ > _ New in v9.0.0._ Report tests without executing any of them, neither tests nor hooks.
882
880
883
881
### ` --exit `
884
882
@@ -1015,6 +1013,15 @@ Specify an explicit path to a [configuration file](#configuring-mocha-nodejs).
1015
1013
1016
1014
By default, Mocha will search for a config file if ` --config ` is not specified; use ` --no-config ` to suppress this behavior.
1017
1015
1016
+ ### ` --node-option <name>, -n <name> `
1017
+
1018
+ > _ New in v9.1.0._
1019
+
1020
+ For Node.js and V8 options. Mocha forwards these options to Node.js by spawning a new child-process.<br >
1021
+ e.g. ` -n require=foo -n unhandled-rejections=strict `
1022
+
1023
+ Can also be specified as a comma-delimited list: ` -n "require=foo, unhandled-rejections=strict" `
1024
+
1018
1025
### ` --opts <path> `
1019
1026
1020
1027
> _ Removed in v8.0.0. Please use [ configuration file] ( #configuring-mocha-nodejs ) instead._
@@ -1159,8 +1166,6 @@ Requires either `--grep` or `--fgrep` (but not both).
1159
1166
1160
1167
### ` --inspect, --inspect-brk, inspect `
1161
1168
1162
- > _ BREAKING CHANGE in v7.0.0; ` --debug ` / ` --debug-brk ` are removed and ` debug ` is deprecated._
1163
-
1164
1169
Enables Node.js' inspector.
1165
1170
1166
1171
Use ` --inspect ` / ` --inspect-brk ` to launch the V8 inspector for use with Chrome Dev Tools.
@@ -1209,6 +1214,8 @@ These flags vary depending on your version of Node.js.
1209
1214
1210
1215
` node ` flags can be defined in Mocha's [ configuration] ( #configuring-mocha-nodejs ) .
1211
1216
1217
+ > _ New in v9.1.0._ You can also pass ` node ` flags to Node.js using [ ` --node-option ` ] ( #-node-option-name-n-name ) .
1218
+
1212
1219
### ` --enable-source-maps `
1213
1220
1214
1221
> _ New in Node.js v12.12.0_
@@ -1228,6 +1235,8 @@ Prepend `--v8-` to any flag listed in the output of `node --v8-options` (excludi
1228
1235
1229
1236
V8 flags can be defined in Mocha's [ configuration] ( #configuring-mocha-nodejs ) .
1230
1237
1238
+ > _ New in v9.1.0._ You can also pass V8 flags (without ` --v8- ` ) to Node.js using [ ` --node-option ` ] ( #-node-option-name-n-name ) .
1239
+
1231
1240
## Parallel Tests
1232
1241
1233
1242
> _ New in v.8.0.0._
0 commit comments