Closed
Description
AVA recognizes ava.config.mjs
files but refuses to load them. Let's fix this!
See the code here:
Line 109 in 7f99aef
Of course import()
is only available on Node.js 13. This should fail gracefully on Node.js 10 and 12.
import()
is asynchronous. The loadConfig()
method should still return synchronously when loading other files.
The documentation needs to be updated to explain when .mjs
config files make sense and when users should use .cjs
or .js
files. Mostly this is to do with ESLint compatibility (since rules must currently be synchronous).