summaryrefslogtreecommitdiff
path: root/test/es-module
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2019-10-14 13:28:42 -0400
committerGuy Bedford <guybedford@gmail.com>2019-10-16 22:01:19 -0400
commit1e5ed9a5db7494d2e415e7937ee0caa4f68e5505 (patch)
treea2118f05c9efb90f5311e1ebdf137e231f3ff0d2 /test/es-module
parenta6b030d5ac2c4a2d34f6b9eb3f945d252a42843e (diff)
downloadandroid-node-v8-1e5ed9a5db7494d2e415e7937ee0caa4f68e5505.tar.gz
android-node-v8-1e5ed9a5db7494d2e415e7937ee0caa4f68e5505.tar.bz2
android-node-v8-1e5ed9a5db7494d2e415e7937ee0caa4f68e5505.zip
esm: modify resolution order for specifier flag
Currently `--es-module-specifier-resolution=node` has an alternative resolution order than the default in common.js, this causes inconsistencies. As discussed in @nodejs/modules we want to preserve resolution order between implementations. PR-URL: https://github.com/nodejs/node/pull/29974 Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/es-module')
-rw-r--r--test/es-module/test-esm-specifiers.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/es-module/test-esm-specifiers.mjs b/test/es-module/test-esm-specifiers.mjs
index 0c5e1ac04a..59d54cbf63 100644
--- a/test/es-module/test-esm-specifiers.mjs
+++ b/test/es-module/test-esm-specifiers.mjs
@@ -1,5 +1,5 @@
// Flags: --experimental-modules --es-module-specifier-resolution=node
-import { mustNotCall } from '../common';
+import { mustNotCall } from '../common/index.mjs';
import assert from 'assert';
// commonJS index.js
@@ -14,8 +14,8 @@ assert.strictEqual(commonjs, 'commonjs');
assert.strictEqual(module, 'module');
assert.strictEqual(success, 'success');
assert.strictEqual(explicit, 'esm');
-assert.strictEqual(implicit, 'esm');
-assert.strictEqual(implicitModule, 'esm');
+assert.strictEqual(implicit, 'cjs');
+assert.strictEqual(implicitModule, 'cjs');
async function main() {
try {