mochajs/mocha · error · Error
ERR_MOCHA_FORBIDDEN_EXCLUSIVITY
ERR_MOCHA_FORBIDDEN_EXCLUSIVITY
Error message
`.only` forbidden by --forbid-only (or "`.only` is not supported in parallel mode" in workers)
What it means
Error "`.only` forbidden by --forbid-only (or "`.only` is not supported in parallel mode" in workers)" thrown in mochajs/mocha.
Source
Thrown at lib/interfaces/common.js:98
*
* @param {string} name
* @param {Function} fn
*/
afterEach: function (name, fn) {
return suites[0].afterEach(name, fn);
},
suite: {
/**
* Create an exclusive Suite; convenience function
* See docstring for create() below.
*
* @param {Object} opts
* @returns {Suite}
*/
only: function only(opts) {
if (mocha.options.forbidOnly) {
throw createForbiddenExclusivityError(mocha);
}
opts.isOnly = true;
return this.create(opts);
},
/**
* Create a Suite, but skip it; convenience function
* See docstring for create() below.
*
* @param {Object} opts
* @returns {Suite}
*/
skip: function skip(opts) {
opts.pending = true;
return this.create(opts);
},
/**View on GitHub (pinned to 6bcbee4fd9)
When it happens
Trigger: Thrown at lib/interfaces/common.js:98 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of mochajs/mocha@6bcbee4fd9 (2026-09-01).
Data as JSON: /api/errors/7dbdb129393e265f.
Report an issue: GitHub.