summaryrefslogtreecommitdiff
path: root/test/message/esm_loader_syntax_error.out
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-11-02 12:10:53 +0100
committerMichaël Zasso <targos@protonmail.com>2019-11-09 09:30:36 +0100
commit8bb83f4d3d29506c9153ff8e025b076531648e1d (patch)
tree465d51926e41a7745e52d808827611b45834ef49 /test/message/esm_loader_syntax_error.out
parent0356746f50189368172d389ea1b69d8876cf329b (diff)
downloadandroid-node-v8-8bb83f4d3d29506c9153ff8e025b076531648e1d.tar.gz
android-node-v8-8bb83f4d3d29506c9153ff8e025b076531648e1d.tar.bz2
android-node-v8-8bb83f4d3d29506c9153ff8e025b076531648e1d.zip
esm: exit the process with an error if loader has an issue
Previously, this would trigger an unhandled rejection that the user cannot handle. Fixes: https://github.com/nodejs/node/issues/30205 PR-URL: https://github.com/nodejs/node/pull/30219 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'test/message/esm_loader_syntax_error.out')
-rw-r--r--test/message/esm_loader_syntax_error.out9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/message/esm_loader_syntax_error.out b/test/message/esm_loader_syntax_error.out
new file mode 100644
index 0000000000..9767a9c86c
--- /dev/null
+++ b/test/message/esm_loader_syntax_error.out
@@ -0,0 +1,9 @@
+(node:*) ExperimentalWarning: The ESM module loader is experimental.
+(node:*) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
+file://*/test/fixtures/es-module-loaders/syntax-error.mjs:2
+await async () => 0;
+^^^^^
+
+SyntaxError: Unexpected reserved word
+ at Loader.moduleStrategy (internal/modules/esm/translators.js:*:*)
+ at async link (internal/modules/esm/module_job.js:*:*)