My Node-based project is implemented using native ES module support on Node thanks to the --experimental-modules
CLI switch (i.e. node --experimental-modules
).
Obviously, when I run a spec using Jasmine node --experimental-modules ./node_modules/jasmine/bin/jasmine
I get the following error:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module
Is it ever possible to use Jasmine using ES modules in Node?
If not, is there any alternative to don't use a framework (e.g. running tests with npm
scripts)?
Aucun commentaire:
Enregistrer un commentaire