Mocha excepting process.argv always contain strings #3861
Labels
area: node.js
command-line-or-Node.js-specific
invalid
not something we need to work on, such as a non-reproducing issue or an external root cause
status: wontfix
typically a feature which won't be added, or a "bug" which is actually intended behavior
Prerequisites
faq
labelnode node_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
Running mocha by require it with overriden process.argv will fail if args is not strings. It is hacky way but it allow to use multiple different runners by the same wrapper script, and it worked for mocha2 and mocha4. In mocha 6.0.2 this ends with error.
Steps to Reproduce
Expected behavior: consume option of number type also
Actual behavior:
current master line
But fixing it in-place (
arg.toString().split('=')
) will not work because of yargs-parser similar issue.Reproduces how often: always
Versions
mocha --version
andnode node_modules/.bin/mocha --version
: 6.0.2node --version
: v.10.15.3Additional Information
The text was updated successfully, but these errors were encountered: