jasmine / jasmine-npm

A jasmine runner for node projects.
MIT License
376 stars 145 forks source link

Syntax errors in ES modules are reported without the filename #168

Closed sgravrock closed 3 years ago

sgravrock commented 3 years ago

Steps to reproduce:

  1. Install jasmine-npm 3.6.2.
  2. Create a file whose name ends in .mjs and matches one of the fileglobs in jasmine.json.
  3. Run Jasmine.

Expected: The error is reported in a way that lets the user know what file has the syntax error. Observed: The filename is not reported. E.g. for a syntax error in aSpec.mjs:

SyntaxError: missing ) after argument list
    at Loader.moduleStrategy (internal/modules/esm/translators.js:117:18)
    at async link (internal/modules/esm/module_job.js:42:21)
(Use `node --trace-warnings ...` to show where the warning was created)