From 6740f3c2090ea90523d70185fb092891c815c623 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Fri, 1 Sep 2023 01:15:27 +0800 Subject: [PATCH] test: verify dynamic import call with absolute path strings PR-URL: https://github.com/nodejs/node/pull/49275 Refs: https://github.com/nodejs/node/pull/48655 Reviewed-By: Antoine du Hamel --- test/es-module/test-esm-dynamic-import.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/es-module/test-esm-dynamic-import.js b/test/es-module/test-esm-dynamic-import.js index d246841c2a6d8b..f69682ef3bca8f 100644 --- a/test/es-module/test-esm-dynamic-import.js +++ b/test/es-module/test-esm-dynamic-import.js @@ -66,4 +66,7 @@ function expectFsNamespace(result) { 'ERR_UNSUPPORTED_ESM_URL_SCHEME', msg); } + // If the specifier is an origin-relative URL, it should + // be treated as a file: URL. + expectOkNamespace(import(targetURL.pathname)); })();