In other words: No useful error message. My CI doesn't capture error response text either of course... so after some digging I built an environment where I could experiment and can reproduce the error with a simple file containing:
let x = 0;
org.mozilla.javascript.EvaluatorException: missing ; before statement (/js/x.js#1)
at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:77)
at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:64)
at org.mozilla.javascript.Parser.addError(Parser.java:188)
at org.mozilla.javascript.Parser.addError(Parser.java:166)
at org.mozilla.javascript.Parser.reportError(Parser.java:256)
at org.mozilla.javascript.Parser.reportError(Parser.java:243)
at org.mozilla.javascript.Parser.reportError(Parser.java:236)
at org.mozilla.javascript.Parser.autoInsertSemicolon(Parser.java:1100)
at org.mozilla.javascript.Parser.statementHelper(Parser.java:1077)
at org.mozilla.javascript.Parser.statement(Parser.java:934)
at org.mozilla.javascript.Parser.parse(Parser.java:573)
at org.mozilla.javascript.Parser.parse(Parser.java:511)
at jscover.instrument.SourceProcessor.instrumentSource(SourceProcessor.java:442)
at jscover.instrument.SourceProcessor.processSourceWithoutHeader(SourceProcessor.java:420)
at jscover.instrument.SourceProcessor.processSource(SourceProcessor.java:408)
at jscover.instrument.SourceProcessor.processSourceForServer(SourceProcessor.java:396)
at jscover.instrument.InstrumenterService.instrumentJSForWebServer(InstrumenterService.java:365)
at jscover.server.InstrumentingRequestHandler.handleGet(InstrumentingRequestHandler.java:469)
at jscover.server.HttpServer.run(HttpServer.java:416)
According to the ES6 Support table you linked to in https://github.com/tntim96/JSCover/issues/224#issuecomment-274945470 I tried to use the ES6 feature "let" but that did not work at all:
In the jscover log I get (with -ws and --log=FINEST):
In other words: No useful error message. My CI doesn't capture error response text either of course... so after some digging I built an environment where I could experiment and can reproduce the error with a simple file containing:
I currently use:
and according to http://mozilla.github.io/rhino/compat/engines.html this should work.