Initialize workspace properly in tests (#2994)

For vim command I'd like to be able to test that e.g. workspace::Save
works.
This commit is contained in:
Conrad Irwin 2023-09-19 21:02:38 -06:00 committed by GitHub
commit 4331cb8058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ use language::{point_to_lsp, FakeLspAdapter, Language, LanguageConfig, LanguageQ
use lsp::{notification, request};
use project::Project;
use smol::stream::StreamExt;
use workspace::{pane, AppState, Workspace, WorkspaceHandle};
use workspace::{AppState, Workspace, WorkspaceHandle};
use crate::{multi_buffer::ToPointUtf16, Editor, ToPoint};
@ -38,12 +38,10 @@ impl<'a> EditorLspTestContext<'a> {
let app_state = cx.update(AppState::test);
cx.update(|cx| {
theme::init((), cx);
language::init(cx);
crate::init(cx);
pane::init(cx);
workspace::init(app_state.clone(), cx);
Project::init_settings(cx);
workspace::init_settings(cx);
});
let file_name = format!(