node/test/fixtures/es-module-loaders
Ben Noordhuis b719b77215
module: print better message on esm syntax error
Include the offending line in the output and underline the bad token.

Before this commit, it printed "SyntaxError: Unexpected reserved word"
without indicating where the syntax error is.

Now it prints the line and underlines the offending token, like it does
for syntax errors in CJS scripts.

Minor changes are made to the test runner in order to support `*.mjs`
files in test/message.

Fixes: https://github.com/nodejs/node/issues/17277
PR-URL: https://github.com/nodejs/node/pull/17281
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2017-12-12 03:27:53 -05:00
..
builtin-named-exports-loader.mjs
example-loader.mjs
js-as-esm.js
js-loader.mjs
loader-dep.js
loader-shared-dep.mjs module: fix for #17130 shared loader cjs dep 2017-12-12 03:27:46 -05:00
loader-with-dep.mjs
not-found-assert-loader.mjs
syntax-error.mjs module: print better message on esm syntax error 2017-12-12 03:27:53 -05:00