summaryrefslogtreecommitdiff
path: root/test/es-module/test-esm-specifiers-both-flags.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'test/es-module/test-esm-specifiers-both-flags.mjs')
-rw-r--r--test/es-module/test-esm-specifiers-both-flags.mjs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/es-module/test-esm-specifiers-both-flags.mjs b/test/es-module/test-esm-specifiers-both-flags.mjs
new file mode 100644
index 0000000000..fc5c7fcd0e
--- /dev/null
+++ b/test/es-module/test-esm-specifiers-both-flags.mjs
@@ -0,0 +1,16 @@
+import { mustCall } from '../common/index.mjs';
+import { exec } from 'child_process';
+import assert from 'assert';
+
+const expectedError =
+ 'cannot use --es-module-specifier-resolution ' +
+ 'and --experimental-specifier-resolution at the same time';
+
+const flags = '--es-module-specifier-resolution=node ' +
+ '--experimental-specifier-resolution=node';
+
+exec(`${process.execPath} ${flags}`, {
+ timeout: 300
+}, mustCall((error) => {
+ assert(error.message.includes(expectedError));
+}));