From 939a070c8cbe77626e07a01646c324b2ae5ac740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 13 May 2022 17:40:50 +0200 Subject: feat: add --no-config flag (#14555) This flag disables loading of configuration file, ie. it will not be automatically discovered and loaded. Of course this flag conflicts with "--config" flag and they cannot be used together. --- cli/tests/integration/run_tests.rs | 6 ++++++ cli/tests/testdata/run/with_config/no_auto_discovery.out | 4 ++++ 2 files changed, 10 insertions(+) create mode 100644 cli/tests/testdata/run/with_config/no_auto_discovery.out (limited to 'cli/tests') diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs index 1cf22a51a..dc158fd7a 100644 --- a/cli/tests/integration/run_tests.rs +++ b/cli/tests/integration/run_tests.rs @@ -2560,6 +2560,12 @@ itest!(config_auto_discovered_for_local_script { output_str: Some("ok\n"), }); +itest!(no_config_auto_discovery_for_local_script { + args: "run --quiet --no-config run/with_config/frontend_work.ts", + output: "run/with_config/no_auto_discovery.out", + exit_code: 1, +}); + itest!(config_not_auto_discovered_for_remote_script { args: "run --quiet http://127.0.0.1:4545/run/with_config/server_side_work.ts", output_str: Some("ok\n"), diff --git a/cli/tests/testdata/run/with_config/no_auto_discovery.out b/cli/tests/testdata/run/with_config/no_auto_discovery.out new file mode 100644 index 000000000..59339ebe5 --- /dev/null +++ b/cli/tests/testdata/run/with_config/no_auto_discovery.out @@ -0,0 +1,4 @@ +error: TS2584 [ERROR]: Cannot find name 'document'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. + console.log(document); + ~~~~~~~~ + at [WILDCARD]run/with_config/frontend_work.ts:2:15 -- cgit v1.2.3