Fix the tests

Kirill Bulatov created

Change summary

crates/project/src/prettier_support.rs  | 9 +++++++--
crates/project2/src/prettier_support.rs | 9 +++++++--
2 files changed, 14 insertions(+), 4 deletions(-)

Detailed changes

crates/project/src/prettier_support.rs 🔗

@@ -601,13 +601,18 @@ impl Project {
     pub fn install_default_prettier(
         &mut self,
         _worktree: Option<WorktreeId>,
-        _plugins: HashSet<&'static str>,
+        plugins: HashSet<&'static str>,
         _cx: &mut ModelContext<Self>,
     ) {
         // suppress unused code warnings
-        let _ = &self.default_prettier.installed_plugins;
         let _ = install_prettier_packages;
         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")))]

crates/project2/src/prettier_support.rs 🔗

@@ -615,13 +615,18 @@ impl Project {
     pub fn install_default_prettier(
         &mut self,
         _worktree: Option<WorktreeId>,
-        _plugins: HashSet<&'static str>,
+        plugins: HashSet<&'static str>,
         _cx: &mut ModelContext<Self>,
     ) {
         // suppress unused code warnings
-        let _ = &self.default_prettier.installed_plugins;
         let _ = install_prettier_packages;
         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")))]