From 2872b362ff76273d897d75bb8a3ddd5510c182f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Sat, 2 May 2020 15:51:08 +0200 Subject: BREAKING: disallow static import of local modules from remote modules (#5050) This commit changes module loading logic to disallow statically import local module (file:// scheme) from remote modules (http://, https:// schemes). --- cli/tests/integration_tests.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'cli/tests/integration_tests.rs') diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index fbaab7674..7827d386a 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1422,6 +1422,22 @@ itest!(error_type_definitions { output: "error_type_definitions.ts.out", }); +itest!(error_local_static_import_from_remote_ts { + args: "run --reload http://localhost:4545/cli/tests/error_local_static_import_from_remote.ts", + check_stderr: true, + exit_code: 1, + http_server: true, + output: "error_local_static_import_from_remote.ts.out", +}); + +itest!(error_local_static_import_from_remote_js { + args: "run --reload http://localhost:4545/cli/tests/error_local_static_import_from_remote.js", + check_stderr: true, + exit_code: 1, + http_server: true, + output: "error_local_static_import_from_remote.js.out", +}); + // TODO(bartlomieju) Re-enable itest_ignore!(error_worker_dynamic { args: "run --reload error_worker_dynamic.ts", -- cgit v1.2.3