Fix the tests

This commit is contained in:
Kirill Bulatov 2023-11-29 12:10:41 +02:00
parent 3796e7eecb
commit 3e3b64bb1c
2 changed files with 14 additions and 4 deletions

View file

@ -601,13 +601,18 @@ impl Project {
pub fn install_default_prettier( pub fn install_default_prettier(
&mut self, &mut self,
_worktree: Option<WorktreeId>, _worktree: Option<WorktreeId>,
_plugins: HashSet<&'static str>, plugins: HashSet<&'static str>,
_cx: &mut ModelContext<Self>, _cx: &mut ModelContext<Self>,
) { ) {
// suppress unused code warnings // suppress unused code warnings
let _ = &self.default_prettier.installed_plugins;
let _ = install_prettier_packages; let _ = install_prettier_packages;
let _ = save_prettier_server_file; let _ = save_prettier_server_file;
self.default_prettier.installed_plugins.extend(plugins);
self.default_prettier.prettier = PrettierInstallation::Installed(PrettierInstance {
attempt: 0,
prettier: None,
});
} }
#[cfg(not(any(test, feature = "test-support")))] #[cfg(not(any(test, feature = "test-support")))]

View file

@ -615,13 +615,18 @@ impl Project {
pub fn install_default_prettier( pub fn install_default_prettier(
&mut self, &mut self,
_worktree: Option<WorktreeId>, _worktree: Option<WorktreeId>,
_plugins: HashSet<&'static str>, plugins: HashSet<&'static str>,
_cx: &mut ModelContext<Self>, _cx: &mut ModelContext<Self>,
) { ) {
// suppress unused code warnings // suppress unused code warnings
let _ = &self.default_prettier.installed_plugins;
let _ = install_prettier_packages; let _ = install_prettier_packages;
let _ = save_prettier_server_file; let _ = save_prettier_server_file;
self.default_prettier.installed_plugins.extend(plugins);
self.default_prettier.prettier = PrettierInstallation::Installed(PrettierInstance {
attempt: 0,
prettier: None,
});
} }
#[cfg(not(any(test, feature = "test-support")))] #[cfg(not(any(test, feature = "test-support")))]