diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-09-09 19:37:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-09 19:37:01 +0100 |
commit | f75a17521df053218c0c2b5fb93c5354f9c8f274 (patch) | |
tree | 2f0916e2c9f3c3894b2dec01e712d544f7945a0d /cli/lsp/code_lens.rs | |
parent | 947865c05478fce0675fce93fd2811f93b703287 (diff) |
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`.
Diffstat (limited to 'cli/lsp/code_lens.rs')
-rw-r--r-- | cli/lsp/code_lens.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/lsp/code_lens.rs b/cli/lsp/code_lens.rs index c451e30bd..d64b2014f 100644 --- a/cli/lsp/code_lens.rs +++ b/cli/lsp/code_lens.rs @@ -407,7 +407,9 @@ fn collect_test( parsed_source: Option<ParsedSource>, config: &Config, ) -> Result<Vec<lsp::CodeLens>, AnyError> { - if config.specifier_code_lens_test(specifier) { + if config.specifier_enabled_for_test(specifier) + && config.specifier_code_lens_test(specifier) + { if let Some(parsed_source) = parsed_source { let mut collector = DenoTestCollector::new(specifier.clone(), parsed_source.clone()); |