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:
commit
4331cb8058
1 changed files with 2 additions and 4 deletions
|
@ -14,7 +14,7 @@ use language::{point_to_lsp, FakeLspAdapter, Language, LanguageConfig, LanguageQ
|
||||||
use lsp::{notification, request};
|
use lsp::{notification, request};
|
||||||
use project::Project;
|
use project::Project;
|
||||||
use smol::stream::StreamExt;
|
use smol::stream::StreamExt;
|
||||||
use workspace::{pane, AppState, Workspace, WorkspaceHandle};
|
use workspace::{AppState, Workspace, WorkspaceHandle};
|
||||||
|
|
||||||
use crate::{multi_buffer::ToPointUtf16, Editor, ToPoint};
|
use crate::{multi_buffer::ToPointUtf16, Editor, ToPoint};
|
||||||
|
|
||||||
|
@ -38,12 +38,10 @@ impl<'a> EditorLspTestContext<'a> {
|
||||||
let app_state = cx.update(AppState::test);
|
let app_state = cx.update(AppState::test);
|
||||||
|
|
||||||
cx.update(|cx| {
|
cx.update(|cx| {
|
||||||
theme::init((), cx);
|
|
||||||
language::init(cx);
|
language::init(cx);
|
||||||
crate::init(cx);
|
crate::init(cx);
|
||||||
pane::init(cx);
|
workspace::init(app_state.clone(), cx);
|
||||||
Project::init_settings(cx);
|
Project::init_settings(cx);
|
||||||
workspace::init_settings(cx);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let file_name = format!(
|
let file_name = format!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue