summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorqualitymanifest <qualitymanifest@gmail.com>2019-11-29 23:11:21 -0500
committerGuy Bedford <guybedford@gmail.com>2019-12-06 23:59:39 -0500
commit7ab21b2f5702ae0b2a5fe5d30ec356f83a95f698 (patch)
tree29feac6d2e7e37dd8f468ff58dd8d206a4e03fbb /test
parent6669cd138e918c6252e7c1dcb4bdfbc673105bad (diff)
downloadandroid-node-v8-7ab21b2f5702ae0b2a5fe5d30ec356f83a95f698.tar.gz
android-node-v8-7ab21b2f5702ae0b2a5fe5d30ec356f83a95f698.tar.bz2
android-node-v8-7ab21b2f5702ae0b2a5fe5d30ec356f83a95f698.zip
lib: add parent to ERR_UNKNOWN_FILE_EXTENSION
- default_resolve updated to pass parentURL into error - ERR_UNKNOWN_FILE_EXTENSION updated to include parentURL - test added to check for import message in error PR-URL: https://github.com/nodejs/node/pull/30728 Fixes: https://github.com/nodejs/node/issues/30721 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/es-module/test-esm-invalid-extension.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/es-module/test-esm-invalid-extension.js b/test/es-module/test-esm-invalid-extension.js
index cdf9476b29..87b0c6691d 100644
--- a/test/es-module/test-esm-invalid-extension.js
+++ b/test/es-module/test-esm-invalid-extension.js
@@ -6,8 +6,10 @@ const { spawnSync } = require('child_process');
const fixture = fixtures.path('/es-modules/import-invalid-ext.mjs');
const child = spawnSync(process.execPath, [fixture]);
const errMsg = 'TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension';
+const importMsg = `imported from ${fixture}`;
assert.strictEqual(child.status, 1);
assert.strictEqual(child.signal, null);
assert.strictEqual(child.stdout.toString().trim(), '');
assert(child.stderr.toString().includes(errMsg));
+assert(child.stderr.toString().includes(importMsg));