From 338622022c9f9e84aaa2fbfb8b2492c6c80c193f Mon Sep 17 00:00:00 2001 From: Jakob Krigovsky Date: Wed, 29 Apr 2020 11:36:12 +0200 Subject: [PATCH] Fix missing dot in name of configuration file --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index aeaa1c318c..6c66053d8c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1565,7 +1565,7 @@ Node.JS native ESM support still has status: **Stability: 1 - Experimental** - [Custom reporters](#third-party-reporters) and [custom interfaces](#interfaces) can only be CommonJS files - [Required modules](#-require-module-r-module) can only be CommonJS files -- [Configuration file](#configuring-mocha-nodejs) can only be a CommonJS file (`mocharc.js` or `mocharc.cjs`) +- [Configuration file](#configuring-mocha-nodejs) can only be a CommonJS file (`.mocharc.js` or `.mocharc.cjs`) - When using module-level mocks via libs like `proxyquire`, `rewiremock` or `rewire`, hold off on using ES modules for your test files - Node.JS native ESM support does not work with [esm][npm-esm] module @@ -1732,7 +1732,7 @@ tests as shown below: Mocha supports configuration files, typical of modern command-line tools, in several formats: -- **JavaScript**: Create a `.mocharc.js` (or `mocharc.cjs` when using [`"type"="module"`](#nodejs-native-esm-support) in your `package.json`) +- **JavaScript**: Create a `.mocharc.js` (or `.mocharc.cjs` when using [`"type"="module"`](#nodejs-native-esm-support) in your `package.json`) in your project's root directory, and export an object (`module.exports = {/* ... */}`) containing your configuration. - **YAML**: Create a `.mocharc.yaml` (or `.mocharc.yml`) in your project's root directory. - **JSON**: Create a `.mocharc.json` (or `.mocharc.jsonc`) in your project's root directory. Comments — while not valid JSON — are allowed in this file, and will be ignored by Mocha.