summaryrefslogtreecommitdiff
path: root/cli/tests/integration
diff options
context:
space:
mode:
authornokazn <41154684+nokazn@users.noreply.github.com>2024-01-04 10:43:17 +0900
committerGitHub <noreply@github.com>2024-01-03 20:43:17 -0500
commita0b687235907ce91358677353c00f575548313b4 (patch)
tree5a91d08d997ac7226208f3a24211fef9ef1123ef /cli/tests/integration
parent00970daea2245bf4af6b3ee21d0e522fec5638b8 (diff)
fix(cli): respect `exclude` option for `deno check` command (#21779)
This PR fixes #21658. - `check` subcommand sees `exclude` option in `deno.json`. When some paths passed with `check` command listed in `exclude`, they are ignored. - When some files are listed in `exclude` and imported indirectly among module graph, they are checked.
Diffstat (limited to 'cli/tests/integration')
-rw-r--r--cli/tests/integration/check_tests.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/cli/tests/integration/check_tests.rs b/cli/tests/integration/check_tests.rs
index fb699072e..36b80149d 100644
--- a/cli/tests/integration/check_tests.rs
+++ b/cli/tests/integration/check_tests.rs
@@ -133,6 +133,34 @@ itest!(check_deno_unstable_from_config {
output_str: Some(""),
});
+itest!(check_with_exclude_option_by_dir {
+ args:
+ "check --quiet --config check/exclude_option/deno.exclude_dir.json check/exclude_option/ignored/index.ts",
+ output_str: Some(""),
+ exit_code: 0,
+});
+
+itest!(check_with_exclude_option_by_glob {
+ args:
+ "check --quiet --config check/exclude_option/deno.exclude_glob.json check/exclude_option/ignored/index.ts",
+ output_str: Some(""),
+ exit_code: 0,
+});
+
+itest!(check_without_exclude_option {
+ args:
+ "check --quiet --config check/exclude_option/deno.json check/exclude_option/ignored/index.ts",
+ output: "check/exclude_option/exclude_option.ts.error.out",
+ exit_code: 1,
+});
+
+itest!(check_imported_files_listed_in_exclude_option {
+ args:
+ "check --quiet --config check/exclude_option/deno.exclude_dir.json check/exclude_option/index.ts",
+ output: "check/exclude_option/exclude_option.ts.error.out",
+ exit_code: 1,
+});
+
#[test]
fn cache_switching_config_then_no_config() {
let context = TestContext::default();