diff options
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 353866513..75ed8ebe3 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -3915,6 +3915,7 @@ mod tests { use super::*; use crate::cache::GlobalHttpCache; use crate::cache::HttpCache; + use crate::cache::RealDenoCacheEnv; use crate::http_util::HeadersMap; use crate::lsp::cache::CacheMetadata; use crate::lsp::config::WorkspaceSettings; @@ -3931,7 +3932,10 @@ mod tests { fixtures: &[(&str, &str, i32, LanguageId)], location: &Path, ) -> 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.clone()); for (specifier, source, version, language_id) in fixtures { let specifier = @@ -3960,7 +3964,8 @@ mod tests { sources: &[(&str, &str, i32, LanguageId)], ) -> (JsRuntime, Arc<StateSnapshot>, PathBuf) { let location = temp_dir.path().join("deps").to_path_buf(); - let cache = Arc::new(GlobalHttpCache::new(location.clone())); + let cache = + Arc::new(GlobalHttpCache::new(location.clone(), RealDenoCacheEnv)); let state_snapshot = Arc::new(mock_state_snapshot(sources, &location)); let mut runtime = js_runtime(Default::default(), cache); start(&mut runtime, debug).unwrap(); @@ -4440,7 +4445,7 @@ mod tests { LanguageId::TypeScript, )], ); - let cache = Arc::new(GlobalHttpCache::new(location)); + let cache = Arc::new(GlobalHttpCache::new(location, RealDenoCacheEnv)); let specifier_dep = resolve_url("https://deno.land/x/example/a.ts").unwrap(); cache |