From 6669cd138e918c6252e7c1dcb4bdfbc673105bad Mon Sep 17 00:00:00 2001 From: Juan José Arboleda Date: Fri, 29 Nov 2019 16:30:25 -0500 Subject: lib: add warning on dynamic import es modules PR-URL: https://github.com/nodejs/node/pull/30720 Reviewed-By: Guy Bedford --- test/es-module/test-esm-dynamic-import.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/es-module/test-esm-dynamic-import.js') diff --git a/test/es-module/test-esm-dynamic-import.js b/test/es-module/test-esm-dynamic-import.js index 8a92ac41ed..1fc22f1d98 100644 --- a/test/es-module/test-esm-dynamic-import.js +++ b/test/es-module/test-esm-dynamic-import.js @@ -42,6 +42,9 @@ function expectFsNamespace(result) { // For direct use of import expressions inside of CJS or ES modules, including // via eval, all kinds of specifiers should work without issue. (function testScriptOrModuleImport() { + common.expectWarning('ExperimentalWarning', + 'The ESM module loader is experimental.'); + // Importing another file, both direct & via eval // expectOkNamespace(import(relativePath)); expectOkNamespace(eval(`import("${relativePath}")`)); -- cgit v1.2.3