With the release of 1.11, CoffeeScript has begun moving toward the ES2015+ standard. In particular, CoffeeScript now supports ES2015 import/export directives.
These do not play well with coffee-coverage right now, producing errors like this:
> mocha --recursive --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul
/Users/wcj/dev/ormojo/node_modules/ormojo/node_modules/coffee-coverage/lib/coffeeCoverage.js:321
throw new CoverageError("Could not compile " + fileName + " after instrumenting: " + err.stack);
^
CoverageError: Could not compile /Users/wcj/dev/ormojo/node_modules/ormojo/src/Backend.coffee after instrumenting: SyntaxError: export statements must be at top-level scope
Presumably, export and import statements should simply be ignored when instrumenting, as they are meant to be declarative.
With the release of 1.11, CoffeeScript has begun moving toward the ES2015+ standard. In particular, CoffeeScript now supports ES2015 import/export directives.
These do not play well with coffee-coverage right now, producing errors like this:
Presumably, export and import statements should simply be ignored when instrumenting, as they are meant to be declarative.