diff options
author | Guy Bedford <guybedford@gmail.com> | 2019-06-23 00:27:56 +0200 |
---|---|---|
committer | Guy Bedford <guybedford@gmail.com> | 2019-06-30 13:21:09 -0400 |
commit | 4565292a771249e0bea3e8b1a69c5c6a7549fffa (patch) | |
tree | 50afe4b0fad23c4cb7239c251f9ee51d43919249 /test/parallel | |
parent | a1731733989844becd2546e12476b12b8ff98b08 (diff) | |
download | android-node-v8-4565292a771249e0bea3e8b1a69c5c6a7549fffa.tar.gz android-node-v8-4565292a771249e0bea3e8b1a69c5c6a7549fffa.tar.bz2 android-node-v8-4565292a771249e0bea3e8b1a69c5c6a7549fffa.zip |
esm: ensure cwd-relative imports for module --eval
PR-URL: https://github.com/nodejs/node/pull/28389
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-cli-eval.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/parallel/test-cli-eval.js b/test/parallel/test-cli-eval.js index acf20bb77f..0d2ea48c06 100644 --- a/test/parallel/test-cli-eval.js +++ b/test/parallel/test-cli-eval.js @@ -274,3 +274,12 @@ child.exec( assert.ifError(err); assert.strictEqual(stdout, 'object\n'); })); + +// Assert that packages can be imported cwd-relative with --eval +child.exec( + `${nodejs} ${execOptions} ` + + '--eval "import \'./test/fixtures/es-modules/mjs-file.mjs\'"', + common.mustCall((err, stdout) => { + assert.ifError(err); + assert.strictEqual(stdout, '.mjs file\n'); + })); |