summaryrefslogtreecommitdiff
path: root/test/parallel/test-module-loading-error.js
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2018-01-20 15:11:03 +0100
committerRich Trott <rtrott@gmail.com>2018-02-07 20:49:58 -0800
commit8ccd320549efdbab3608ddcbefca62bd69f8b879 (patch)
tree474e3443fe5ac5097f3921df86e909f07cf8a442 /test/parallel/test-module-loading-error.js
parent259f62a8e8d4eac2f067b205abc9264b946d6738 (diff)
downloadandroid-node-v8-8ccd320549efdbab3608ddcbefca62bd69f8b879.tar.gz
android-node-v8-8ccd320549efdbab3608ddcbefca62bd69f8b879.tar.bz2
android-node-v8-8ccd320549efdbab3608ddcbefca62bd69f8b879.zip
src: don't abort when package.json is a directory
PR-URL: https://github.com/nodejs/node/pull/18270 Fixes: https://github.com/nodejs/node/issues/8307 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-module-loading-error.js')
-rw-r--r--test/parallel/test-module-loading-error.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/parallel/test-module-loading-error.js b/test/parallel/test-module-loading-error.js
index 818a35eb58..811d7d5ded 100644
--- a/test/parallel/test-module-loading-error.js
+++ b/test/parallel/test-module-loading-error.js
@@ -78,3 +78,10 @@ common.expectsError(
code: 'ERR_INVALID_ARG_VALUE',
message: 'The argument \'id\' must be a non-empty string. Received \'\''
});
+
+common.expectsError(
+ () => { require('../fixtures/packages/is-dir'); },
+ {
+ code: 'MODULE_NOT_FOUND',
+ message: 'Cannot find module \'../fixtures/packages/is-dir\''
+ });