We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abf3dd9 commit 9390441Copy full SHA for 9390441
lib/cli/config.js
@@ -24,6 +24,7 @@ const utils = require('../utils');
24
exports.CONFIG_FILES = [
25
'.mocharc.cjs',
26
'.mocharc.js',
27
+ '.mocharc.mjs',
28
'.mocharc.yaml',
29
'.mocharc.yml',
30
'.mocharc.jsonc',
@@ -71,9 +72,9 @@ exports.loadConfig = filepath => {
71
72
try {
73
if (ext === '.yml' || ext === '.yaml') {
74
config = parsers.yaml(filepath);
- } else if (ext === '.js' || ext === '.cjs') {
75
+ } else if (ext === '.js' || ext === '.cjs' || ext === '.mjs') {
76
config = parsers.js(filepath);
- } else {
77
+ } else {
78
config = parsers.json(filepath);
79
}
80
} catch (err) {
0 commit comments