diff options
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r-- | cli/lsp/diagnostics.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs index 88c4c91cb..4e24673f3 100644 --- a/cli/lsp/diagnostics.rs +++ b/cli/lsp/diagnostics.rs @@ -1331,6 +1331,7 @@ fn generate_deno_diagnostics( mod tests { use super::*; use crate::cache::GlobalHttpCache; + use crate::cache::RealDenoCacheEnv; use crate::lsp::config::ConfigSnapshot; use crate::lsp::config::Settings; use crate::lsp::config::SpecifierSettings; @@ -1349,7 +1350,10 @@ mod tests { location: &Path, maybe_import_map: Option<(&str, &str)>, ) -> StateSnapshot { - let cache = Arc::new(GlobalHttpCache::new(location.to_path_buf())); + let cache = Arc::new(GlobalHttpCache::new( + location.to_path_buf(), + RealDenoCacheEnv, + )); let mut documents = Documents::new(cache); for (specifier, source, version, language_id) in fixtures { let specifier = @@ -1374,7 +1378,7 @@ mod tests { maybe_import_map, assets: Default::default(), cache_metadata: cache::CacheMetadata::new(Arc::new( - GlobalHttpCache::new(location.to_path_buf()), + GlobalHttpCache::new(location.to_path_buf(), RealDenoCacheEnv), )), maybe_node_resolver: None, maybe_npm_resolver: None, @@ -1424,7 +1428,8 @@ let c: number = "a"; None, ); let snapshot = Arc::new(snapshot); - let cache = Arc::new(GlobalHttpCache::new(cache_location)); + let cache = + Arc::new(GlobalHttpCache::new(cache_location, RealDenoCacheEnv)); let ts_server = TsServer::new(Default::default(), cache); // test enabled @@ -1517,7 +1522,8 @@ let c: number = "a"; None, ); let snapshot = Arc::new(snapshot); - let cache = Arc::new(GlobalHttpCache::new(cache_location)); + let cache = + Arc::new(GlobalHttpCache::new(cache_location, RealDenoCacheEnv)); let ts_server = TsServer::new(Default::default(), cache); let config = mock_config(); |