errors: refactor to use a method that formats a list string · nodejs/node@8046e0e · GitHub
Skip to content

Commit 8046e0e

Browse files
daeyeonRafaelGSS
authored andcommitted
errors: refactor to use a method that formats a list string
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45793 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 98fc94a commit 8046e0e

3 files changed

Lines changed: 41 additions & 38 deletions

File tree

lib/internal/errors.js

Lines changed: 20 additions & 37 deletions

test/es-module/test-esm-dynamic-import.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function expectFsNamespace(result) {
5959
'ERR_UNSUPPORTED_ESM_URL_SCHEME');
6060
if (common.isWindows) {
6161
const msg =
62-
'Only URLs with a scheme in: file, data are supported by the default ' +
62+
'Only URLs with a scheme in: file and data are supported by the default ' +
6363
'ESM loader. On Windows, absolute paths must be valid file:// URLs. ' +
6464
"Received protocol 'c:'";
6565
expectModuleError(import('C:\\example\\foo.mjs'),
Lines changed: 20 additions & 0 deletions

0 commit comments

Comments
 (0)