From 0ba90c8c11089500b23761f126a8d08afd38a73e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 7 May 2020 15:57:10 +0200 Subject: fix(imports): fix panic on unsupported scheme (#5131) --- cli/tests/integration_tests.rs | 7 +++++++ cli/tests/unsupported_dynamic_import_scheme.out | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 cli/tests/unsupported_dynamic_import_scheme.out (limited to 'cli/tests') diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index ff3777626..b549dc6d0 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1583,6 +1583,13 @@ itest!(run_v8_help { output: "v8_help.out", }); +itest!(unsupported_dynamic_import_scheme { + args: "eval import('xxx:')", + output: "unsupported_dynamic_import_scheme.out", + check_stderr: true, + exit_code: 1, +}); + itest!(wasm { args: "run wasm.ts", output: "wasm.ts.out", diff --git a/cli/tests/unsupported_dynamic_import_scheme.out b/cli/tests/unsupported_dynamic_import_scheme.out new file mode 100644 index 000000000..2a1a4e01f --- /dev/null +++ b/cli/tests/unsupported_dynamic_import_scheme.out @@ -0,0 +1,5 @@ +error: Uncaught TypeError: Unsupported scheme "xxx" for module "xxx:". Supported schemes: [ + "http", + "https", + "file", +] -- cgit v1.2.3