Open KutnerUri opened 4 years ago
please prioritise
❯ bit test base/button
successfully installed the bit.envs/testers/mocha@5.0.2 tester
bit.gui/base/button@0.0.6
tests failed
file: button.spec.js
✖ Cannot use import statement outside a module
Cannot use import statement outside a module
I am using Mocha tester as my default tester. Currently (v5.0.2), it only works with
require('...')
, aka CommonJS.This was fine, but now new version of TS compiler outputs ESM(import/export) as
/dist
.As a workaround, I'm setting override config to output as ES5/CommonJS.
So, Please support ESM natively in mocha. :)