Refactor out the node runtime crate and hook up all related imports

This commit is contained in:
Mikayla Maki 2023-03-28 10:27:31 -07:00
parent 0ef9cefe0f
commit 941da24f73
21 changed files with 78 additions and 79 deletions

View file

@ -657,6 +657,7 @@ mod tests {
executor::Deterministic, AssetSource, MutableAppContext, TestAppContext, ViewHandle,
};
use language::LanguageRegistry;
use node_runtime::NodeRuntime;
use project::{Project, ProjectPath};
use serde_json::json;
use std::{
@ -1851,12 +1852,9 @@ mod tests {
languages.set_executor(cx.background().clone());
let languages = Arc::new(languages);
let themes = ThemeRegistry::new((), cx.font_cache().clone());
languages::init(
FakeHttpClient::with_404_response(),
cx.background().clone(),
languages.clone(),
themes,
);
let http = FakeHttpClient::with_404_response();
let node_runtime = NodeRuntime::new(http, cx.background().to_owned());
languages::init(languages.clone(), themes, node_runtime);
for name in languages.language_names() {
languages.language_for_name(&name);
}