Is it possible to use ES6 modules in Mocha tests?
Mocha has support for ESM from version 7.1.0 onward (release: Feb. 26, 2020). This requires Node 12.11.0 or higher, and is subject to the current restrictions/limitations of using modules in Node: Either you must use .mjs file extensions for source files that use ES modules, or you must have “type”: “module” in your package.json You … Read more