@@ -1015,6 +1015,15 @@ Specify an explicit path to a [configuration file](#configuring-mocha-nodejs).
10151015
10161016By default, Mocha will search for a config file if ` --config ` is not specified; use ` --no-config ` to suppress this behavior.
10171017
1018+ ### ` --node-option <name>, -n <name> `
1019+
1020+ > _ New in v9.1.0._
1021+
1022+ For Node.js and V8 options. Mocha forwards these options to Node.js by spawning a new child-process.<br >
1023+ e.g. ` -n require=foo -n unhandled-rejections=strict `
1024+
1025+ Can also be specified as a comma-delimited list: ` -n "require=foo, unhandled-rejections=strict" `
1026+
10181027### ` --opts <path> `
10191028
10201029> _ Removed in v8.0.0. Please use [ configuration file] ( #configuring-mocha-nodejs ) instead._
@@ -1159,8 +1168,6 @@ Requires either `--grep` or `--fgrep` (but not both).
11591168
11601169### ` --inspect, --inspect-brk, inspect `
11611170
1162- > _ BREAKING CHANGE in v7.0.0; ` --debug ` / ` --debug-brk ` are removed and ` debug ` is deprecated._
1163-
11641171Enables Node.js' inspector.
11651172
11661173Use ` --inspect ` / ` --inspect-brk ` to launch the V8 inspector for use with Chrome Dev Tools.
@@ -1209,6 +1216,10 @@ These flags vary depending on your version of Node.js.
12091216
12101217` node ` flags can be defined in Mocha's [ configuration] ( #configuring-mocha-nodejs ) .
12111218
1219+ > _ New in v9.1.0._
1220+
1221+ You can also pass ` node ` flags to Node.js using [ ` --node-option ` ] ( #-node-option-name-n-name ) .
1222+
12121223### ` --enable-source-maps `
12131224
12141225> _ New in Node.js v12.12.0_
@@ -1228,6 +1239,10 @@ Prepend `--v8-` to any flag listed in the output of `node --v8-options` (excludi
12281239
12291240V8 flags can be defined in Mocha's [ configuration] ( #configuring-mocha-nodejs ) .
12301241
1242+ > _ New in v9.1.0._
1243+
1244+ You can also pass V8 flags (without ` --v8- ` ) to Node.js using [ ` --node-option ` ] ( #-node-option-name-n-name ) .
1245+
12311246## Parallel Tests
12321247
12331248> _ New in v.8.0.0._
0 commit comments