{"record":{"id":"38882951824e2991","repo":"mochajs/mocha","slug":"err-mocha-unsupported","errorCode":"ERR_MOCHA_UNSUPPORTED","errorMessage":"Option ${numericArg} is unsupported by the mocha cli","messagePattern":"Option (.+?) is unsupported by the mocha cli","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"lib/cli/parse-args.js","lineNumber":371,"sourceCode":"  //    option has an incompatible datatype.\n  const flag = allArgs.find((arg, index) => {\n    const normalizedArg = stripLeadingDashes(arg);\n    return (\n      isMochaFlag(arg) &&\n      allArgs[index + 1] === String(numericArg) &&\n      parsedResult[normalizedArg] !== String(numericArg)\n    );\n  });\n\n  if (flag) {\n    throw createInvalidArgumentTypeError(\n      `Mocha flag '${flag}' given invalid option: '${numericArg}'`,\n      numericArg,\n      expectedTypeForFlag(flag),\n    );\n  }\n\n  throw createUnsupportedError(\n    `Option ${numericArg} is unsupported by the mocha cli`,\n  );\n};\n\n/**\n * Parse the args into a config object.\n * Splits,\n * handles Node args,\n * validates general args,\n * parses into config object,\n * normalizes,\n * validates numerical args,\n * and returns resulting config object.\n * @param {string|string[]} args\n * @param {object} defaultValues\n * @param  {...any} configObjects\n */\nexport const parseMochaArgs = (","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/mochajs/mocha/blob/6bcbee4fd9a95351cedf0fdcb14c7d696486bc5a/lib/cli/parse-args.js#L353-L389","documentation":"Error \"Option ${numericArg} is unsupported by the mocha cli\" thrown in mochajs/mocha.","triggerScenarios":"Thrown at lib/cli/parse-args.js:371 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6bcbee4fd9a95351cedf0fdcb14c7d696486bc5a","analyzedAt":"2026-09-01T03:41:47.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}