From f75a17521df053218c0c2b5fb93c5354f9c8f274 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sat, 9 Sep 2023 19:37:01 +0100 Subject: fix(lsp): respect configured exclusions for testing APIs (#20427) LSP testing APIs now obey the various file inclusion settings: - Modules shown in the text explorer now respect the `exclude`, `test.exclude` and `test.include` fields in `deno.json`, as well as `deno.enablePaths` in VSCode settings. - Modules with testing code lens now respect the `"exclude"`, `test.exclude` and `test.include` fields in `deno.json`. Code lens already respects `deno.enablePaths`. --- cli/lsp/testing/server.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cli/lsp/testing/server.rs') diff --git a/cli/lsp/testing/server.rs b/cli/lsp/testing/server.rs index 58ac7a8c4..562bbfcb0 100644 --- a/cli/lsp/testing/server.rs +++ b/cli/lsp/testing/server.rs @@ -98,6 +98,9 @@ impl TestServer { .documents(DocumentsFilter::AllDiagnosable) { let specifier = document.specifier(); + if !snapshot.config.specifier_enabled_for_test(specifier) { + continue; + } keys.remove(specifier); let script_version = document.script_version(); let valid = if let Some(test) = tests.get(specifier) { -- cgit v1.2.3