Fix the tests
This commit is contained in:
parent
3796e7eecb
commit
3e3b64bb1c
2 changed files with 14 additions and 4 deletions
|
@ -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")))]
|
||||||
|
|
|
@ -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")))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue