-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: arg.split is not a function
when passed a numerical argument
#5028
Comments
Can you please provide a minimal viable code example, for example a repo to clone? |
I'm able to repro this with https://github.com/mochajs/mocha-examples/tree/master/packages/typescript
|
Ha, I happened upon this accidentally while triaging an issue around |
no solution yet? |
@deauthe This repo is fully open source. It's staffed by volunteers such myself, not a private entity. If there is an update or solution it will be posted here. If you're interested in this getting fixed, then the best next step would be to send a PR yourself. Since you seem interested in it I look forward to seeing your PR. 🙂 |
@JoshuaKGoldberg Thank you for your response! I appreciate the work and effort that goes into maintaining mocha. My earlier message wasn’t intended to come across as rude, and I apologize if it seemed that way. I value the work of volunteers like you, and I’ll take a closer look to see if I can contribute a PR to help address this issue. |
@deauthe @JoshuaKGoldberg I stumbled onto this issue too and would like to look into fixing it. If a PR is not already in the works, is it okay if I start working on this issue? |
Thanks for the go-ahead @JoshuaKGoldberg. I've opened a PR for this issue. |
Prerequisites
faq
labelnode_modules/.bin/mocha --version
(Local) andmocha --version
(Global). We recommend that you not install Mocha globally.Description
With similar symptoms to #3861, Mocha fails when given a numerical argument:
Expected behavior:
Mocha to proceed as expected, or to throw a more descriptive error message.
Actual behavior:
A crash and a stacktrace.
Reproduces how often:
100%
Versions
Mocha 10.2.0
Node v18.12.1
macOS Sonoma 14.0
zsh 5.9 (x86_64-apple-darwin23.0)
Additional Information
It can be expected that
argv
is a string array, but it appears thatyargsParser.Arguments._
which is fed back intoparse
atmocha/lib/cli/options.js
Line 246 in 48002bc
The text was updated successfully, but these errors were encountered: