Add init_settings to tests

This commit is contained in:
Mikayla Maki 2023-05-22 20:33:18 -07:00
parent da96802bf0
commit b19a712799
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View File

@ -113,8 +113,12 @@ actions!(
]
);
pub fn init(cx: &mut AppContext) {
pub fn init_settings(cx: &mut AppContext) {
settings::register::<ProjectPanelSettings>(cx);
}
pub fn init(cx: &mut AppContext) {
init_settings(cx);
cx.add_action(ProjectPanel::expand_selected_entry);
cx.add_action(ProjectPanel::collapse_selected_entry);
cx.add_action(ProjectPanel::select_prev);
@ -2051,6 +2055,7 @@ mod tests {
cx.foreground().forbid_parking();
cx.update(|cx| {
cx.set_global(SettingsStore::test(cx));
init_settings(cx);
theme::init((), cx);
language::init(cx);
editor::init_settings(cx);

View File

@ -2068,6 +2068,7 @@ mod tests {
workspace::init(app_state.clone(), cx);
language::init(cx);
editor::init(cx);
project_panel::init_settings(cx);
pane::init(cx);
app_state
})