We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac12f2c commit 559205fCopy full SHA for 559205f
lib/cli/config.js
@@ -22,6 +22,7 @@ const findUp = require('find-up');
22
*/
23
exports.CONFIG_FILES = [
24
'.mocharc.js',
25
+ '.mocharc.cjs',
26
'.mocharc.yaml',
27
'.mocharc.yml',
28
'.mocharc.jsonc',
@@ -75,7 +76,7 @@ exports.loadConfig = filepath => {
75
76
try {
77
if (ext === '.yml' || ext === '.yaml') {
78
config = parsers.yaml(filepath);
- } else if (ext === '.js') {
79
+ } else if (ext === '.js' || ext === '.cjs') {
80
config = parsers.js(filepath);
81
} else {
82
config = parsers.json(filepath);
0 commit comments