☕️ Classic, reliable, trusted test framework for Node.js and the browser
Document #5412 (#5418)
Mark Wiemerf31ce8f84caa
diff --git a/docs-next/src/content/docs/running/configuring.mdx b/docs-next/src/content/docs/running/configuring.mdxindex 448164da..45f8c2ea 100644--- a/docs-next/src/content/docs/running/configuring.mdx+++ b/docs-next/src/content/docs/running/configuring.mdx@@ -62,6 +62,8 @@ In case of conflict, the priority is:Options which can safely be repeated (e.g., `--require`) will be _concatenated_, with higher-priority configuration sources appearing earlier in the list.For example, a `.mocharc.json` containing `"require": "bar"`, coupled with execution of `mocha --require foo`, would cause Mocha to require `foo`, then `bar`, in that order.+This also includes `spec`. For example, a `.mocharc.json` containing `"spec": ["**/*.test.js"]` coupled with execution of `mocha bar.spec.js` would be the same as runninng `mocha bar.spec.js **/*.test.js`, and it would still run all `.test.js` files. To workaround this, you can comment out the `spec` property or use a different config file via `--config`.+## Extending ConfigurationConfigurations can inherit from other modules using the `extends` keyword.diff --git a/docs/index.md b/docs/index.mdindex 28b1e2a3..c104c8b5 100644--- a/docs/index.md+++ b/docs/index.md@@ -2291,7 +2291,9 @@ Mocha will also _merge_ any options found in `package.json` into its run-time co1. Configuration file (`.mocharc.js`, `.mocharc.yml`, etc.)1. `mocha` property of `package.json`-Options which can safely be repeated (e.g., `--require`) will be _concatenated_, with higher-priority configuration sources appearing earlier in the list. For example, a `.mocharc.json` containing `"require": "bar"`, coupled with execution of `mocha --require foo`, would cause Mocha to require `foo`, then `bar`, in that order.+Options which can safely be repeated (e.g., `--require`) will be _concatenated_, with higher-priority configuration sources appearing earlier in the list. For example, a `.mocharc.json` containing `"require": "bar"` coupled with execution of `mocha --require foo` would cause Mocha to require `foo`, then `bar`, in that order.++This also includes `spec`. For example, a `.mocharc.json` containing `"spec": ["**/*.test.js"]` coupled with execution of `mocha bar.spec.js` would be the same as runninng `mocha bar.spec.js **/*.test.js`, and it would still run all `.test.js` files. To workaround this, you can comment out the `spec` property or use a different config file via `--config`.### Extending Configuration