ErrLookup › mochajs/mocha
mochajs/mocha
☕️ Classic, reliable, trusted test framework for Node.js and the browser · JavaScript · 73 source files
Analyzed at 6bcbee4fd9 on 2026-09-01. 43 documented errors.
| Code / Message | Type | Severity | Tags |
|---|---|---|---|
| Not enough non-option arguments: got 0, need at least 1 | exception | error | cli, argument-validation, init |
| Not enough arguments following: ${name} | exception | error | cli, argument-validation, yargs |
| unknown pluginType "${pluginType}" | exception | error | internal, plugin, error-factory |
| Missing runner argument | exception | error | reporters, argument-validation, typeerror |
| invalid or unsupported TAP version: ${JSON.stringify(tapVers | exception | error | reporters, tap, option-validation |
| sync skip; aborting execution | exception | warning | test-execution, skip, pending |
| async skip; aborting execution | exception | warning | test-execution, skip, async |
| Missing runner argument | exception | error | stats, runner, argument-validation |
| Unsupported URL protocol "${parsed.protocol}". Only "file:" | exception | error | esm, url, file-loading |
| invalid state transition: ${state} => ${newState} | exception | error | parallel, state-machine, runner |
| This script is intended to be run as a worker (by the `worke | exception | error | parallel-mode, worker-threads, misuse |
| Invalid argument; expected a non-empty object | exception | error | validation, typeerror, internal-api |
| Warning: ${warning.message} | console | warning | cli, file-glob, warning |
ERR_MOCHA_NO_FILES_MATCH_PATTERN Cannot find any files matching pattern "${filepath}" | error_code | error | cli, glob, no-files, error-code |
ERR_MOCHA_INVALID_ARG_TYPE Argument '${extensions}' required when argument '${filepath}' is a directory | error_code | error | cli, validation, arguments, error-code |
ERR_MOCHA_INVALID_ARG_TYPE Mocha flag '${flag}' given invalid option: '${numericArg}' | error_code | error | |
ERR_MOCHA_UNSUPPORTED Option ${numericArg} is unsupported by the mocha cli | error_code | error | |
ERR_MOCHA_FORBIDDEN_EXCLUSIVITY `.only` forbidden by --forbid-only (or "`.only` is not supported in parallel mod | error_code | error | |
ERR_MOCHA_UNSUPPORTED Pending test forbidden | error_code | error | |
ERR_MOCHA_INVALID_ARG_TYPE Suite "${suite.fullTitle()}" was defined but no callback was supplied. Supply a | error_code | error | |
ERR_MOCHA_INVALID_ARG_TYPE Empty `eventName` string argument | error_code | error | serializer, parallel-mode, argument-validation |
ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION mochaHooks must be an object or a function returning (or fulfilling with) an obj | error_code | error | plugins, root-hooks, configuration |
ERR_MOCHA_INVALID_PLUGIN_DEFINITION pluginDef is non-object or falsy | error_code | error | plugins, api-misuse, argument-validation |
ERR_MOCHA_UNSUPPORTED file output not supported in browser | error_code | error | browser, reporter, unsupported-feature |
ERR_MOCHA_UNSUPPORTED file output not supported in browser | error_code | error | browser, reporter, xunit, unsupported-feature |
ERR_MOCHA_INVALID_ARG_TYPE Test argument "title" should be a string. Received type "${typeof title}" | error_code | error | arguments, type-error, test-constructor |
ERR_MOCHA_UNPARSABLE_FILE Unable to read/parse ${filepath}: ${err} | error_code | error | config, parse-error, cli |
ERR_MOCHA_UNPARSABLE_FILE Unable to read ${filepath}: ${err} | error_code | error | config, package-json, file-io, cli |
ERR_MOCHA_INVALID_REPORTER (reporter) or ERR_MOCHA_INVALID_INTERFACE (ui) "--${pluginType}" can only be specified once | error_code | error | cli, reporter, ui, duplicate-option |
ERR_MOCHA_INVALID_ARG_VALUE invalid reporter option '${opt}' | error_code | error | cli, reporter-options, arguments, validation |
ERR_MOCHA_UNSUPPORTED Arguments ${oneAndDoneOptions.join(" and ")} are mutually exclusive | exception | error | cli, argument-validation |
ERR_MOCHA_MISSING_ARGUMENT "--invert" requires one of "--fgrep <str>" or "--grep <regexp>" | validation | error | cli, argument-validation |
ERR_MOCHA_INVALID_REPORTER ${err.message} | exception | error | reporter, module-loading |
ERR_MOCHA_INVALID_INTERFACE invalid interface '${ui}' | exception | error | ui, interface, config |
ERR_MOCHA_UNSUPPORTED unloadFile() is only supported in a Node.js environment | exception | error | browser, node-only, api-misuse |
ERR_MOCHA_INSTANCE_ALREADY_DISPOSED Mocha instance is already disposed, it cannot be used again. | exception | error | mocha, instance-lifecycle, programmatic-api, state-error |
ERR_MOCHA_INSTANCE_ALREADY_RUNNING Cannot dispose while the mocha instance is still running tests. | exception | error | mocha, instance-lifecycle, async, programmatic-api |
ERR_MOCHA_INVALID_ARG_TYPE Expected a non-empty filepath | validation | error | mocha, parallel, argument-validation, worker-pool |
ERR_MOCHA_FATAL Object missing ID received in event data | exception | critical | mocha, parallel, serialization, internal-error |
ERR_MOCHA_INVALID_ARG_TYPE Expected a non-empty "filepath" argument | validation | error | mocha, parallel, worker, argument-validation |
ERR_MOCHA_INVALID_ARG_VALUE run() was unable to deserialize the options | validation | error | |
ERR_MOCHA_FATAL Test failed after root suite execution completed! | exception | error | |
ERR_MOCHA_UNSUPPORTED workerReporter() not supported in serial mode | exception | error |