From dee94473c435b38b2d7829731804ac96e6856d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 15 Nov 2024 17:09:19 +0000 Subject: fix: update message for unsupported schemes with npm and jsr (#26884) Closes https://github.com/denoland/deno/issues/26596 --- tests/specs/npm/typo_in_npm/__test__.jsonc | 5 +++++ tests/specs/npm/typo_in_npm/main.out | 8 ++++++++ .../unsupported_dynamic_import_scheme.out | 15 ++++++++------- tests/testdata/run/extension_import.ts.out | 15 ++++++++------- 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 tests/specs/npm/typo_in_npm/__test__.jsonc create mode 100644 tests/specs/npm/typo_in_npm/main.out (limited to 'tests') diff --git a/tests/specs/npm/typo_in_npm/__test__.jsonc b/tests/specs/npm/typo_in_npm/__test__.jsonc new file mode 100644 index 000000000..03023c9e7 --- /dev/null +++ b/tests/specs/npm/typo_in_npm/__test__.jsonc @@ -0,0 +1,5 @@ +{ + "args": "run np:cowsay", + "output": "main.out", + "exitCode": 1 +} diff --git a/tests/specs/npm/typo_in_npm/main.out b/tests/specs/npm/typo_in_npm/main.out new file mode 100644 index 000000000..19f17b1d0 --- /dev/null +++ b/tests/specs/npm/typo_in_npm/main.out @@ -0,0 +1,8 @@ +error: Unsupported scheme "np" for module "np:cowsay". Supported schemes: + - "blob" + - "data" + - "file" + - "http" + - "https" + - "jsr" + - "npm" diff --git a/tests/specs/run/unsupported_dynamic_import_scheme/unsupported_dynamic_import_scheme.out b/tests/specs/run/unsupported_dynamic_import_scheme/unsupported_dynamic_import_scheme.out index c708fced4..3bff0201f 100644 --- a/tests/specs/run/unsupported_dynamic_import_scheme/unsupported_dynamic_import_scheme.out +++ b/tests/specs/run/unsupported_dynamic_import_scheme/unsupported_dynamic_import_scheme.out @@ -1,7 +1,8 @@ -error: Uncaught (in promise) TypeError: Unsupported scheme "xxx" for module "xxx:". Supported schemes: [ - "data", - "blob", - "file", - "http", - "https", -] +error: Uncaught (in promise) TypeError: Unsupported scheme "xxx" for module "xxx:". Supported schemes: + - "blob" + - "data" + - "file" + - "http" + - "https" + - "jsr" + - "npm" diff --git a/tests/testdata/run/extension_import.ts.out b/tests/testdata/run/extension_import.ts.out index 88039a9ce..0ff656a9c 100644 --- a/tests/testdata/run/extension_import.ts.out +++ b/tests/testdata/run/extension_import.ts.out @@ -1,8 +1,9 @@ -error: Unsupported scheme "ext" for module "ext:runtime/01_errors.js". Supported schemes: [ - "data", - "blob", - "file", - "http", - "https", -] +error: Unsupported scheme "ext" for module "ext:runtime/01_errors.js". Supported schemes: + - "blob" + - "data" + - "file" + - "http" + - "https" + - "jsr" + - "npm" at [WILDCARD]/extension_import.ts:1:8 -- cgit v1.2.3