Open
Description
Is your feature request related to a problem or a nice-to-have?? Please describe.
To continue the journey in supporting ESM in Mocha, it would be nice to have support for ESM based configuration files. Currently this is documented as a known limitation
Configuration file can only be a CommonJS file (
.mocharc.js
or.mocharc.cjs
)
Describe the solution you'd like
Allow ESM based configuration files in projects, either with (.mocharc.js
) or without (.mocharc.mjs
) a type="module"
field in package.json
export default {
timeout: 30000
}
Describe alternatives you've considered
Only other current alternative in Node is CJS.
Additional context
N / A
Activity