Bug Report Checklist
Expected
passing tests
Actual
after dependabot bumped mocha from ~10.8.1 to ~11.7.6, tests started failing with this error:
npx mocha 1***.js
/app/node_modules/mocha/lib/cli/options.js:139
throw createUnsupportedError(
^
Error: Option 1***.js is unsupported by the mocha cli
at createUnsupportedError (/app/node_modules/mocha/lib/errors.js:126:13)
at createErrorForNumericPositionalArg (/app/node_modules/mocha/lib/cli/options.js:139:11)
at parse (/app/node_modules/mocha/lib/cli/options.js:190:5)
at loadOptions (/app/node_modules/mocha/lib/cli/options.js:291:14)
at Object.<anonymous> (/app/node_modules/mocha/bin/mocha.js:29:14)
at Module._compile (node:internal/modules/cjs/loader:1781:14)
at Object..js (node:internal/modules/cjs/loader:1913:10)
at Module.load (node:internal/modules/cjs/loader:1505:32)
at Function._load (node:internal/modules/cjs/loader:1309:12)
at wrapModuleLoad (node:internal/modules/cjs/loader:254:19) {
code: 'ERR_MOCHA_UNSUPPORTED'
}
other spec files (not starting with a number) work fine. is this a bug, or were we using something unsupported that just happened to work until now?
#5263
this, perhaps?
Minimal, Complete and Verifiable Example
create a spec in a filename starting with a number, try and run it
Versions
see above
Additional Info
No response
Bug Report Checklist
npm audit, or GitHub Advisory issue.faqlabel, but none matched my issue.Expected
passing tests
Actual
after dependabot bumped mocha from
~10.8.1to~11.7.6, tests started failing with this error:other spec files (not starting with a number) work fine. is this a bug, or were we using something unsupported that just happened to work until now?
#5263
this, perhaps?
Minimal, Complete and Verifiable Example
create a spec in a filename starting with a number, try and run it
Versions
see above
Additional Info
No response