nodejs/node#34637 introduces a -u flag for node, which conflicts with Mocha's -u/--ui flag. I had expected Mocha would prefer its own options over node's where there was a conflict, but this is not the case--instead, Mocha explicitly whitelists -r/--require, which was previously the only known command-line flag shared between mocha and node.
To fix this, Mocha needs to change its strategy to detect its own options first, then attempt to detect if something is a node option. Currently, Mocha checks for node options first.
nodejs/node#34637 introduces a
-uflag fornode, which conflicts with Mocha's-u/--uiflag. I had expected Mocha would prefer its own options overnode's where there was a conflict, but this is not the case--instead, Mocha explicitly whitelists-r/--require, which was previously the only known command-line flag shared betweenmochaandnode.To fix this, Mocha needs to change its strategy to detect its own options first, then attempt to detect if something is a
nodeoption. Currently, Mocha checks fornodeoptions first.