Skip to content

Commit

Permalink
Fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fredizzimo committed Oct 9, 2023
1 parent 7cb2a0c commit 8949ceb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ mod tests {
session::{NeovimInstance, NeovimSession},
},
cmd_line::CmdLineSettings,
error_handling::ResultPanicExplanation,
};

#[derive(Clone)]
Expand Down Expand Up @@ -261,7 +262,9 @@ mod tests {
//TODO: this sets a static variable. Can this have side effects on other tests?
SETTINGS.set::<CmdLineSettings>(&CmdLineSettings::default());

let instance = NeovimInstance::Embedded(create_nvim_command()?);
let command =
create_nvim_command().unwrap_or_explained_panic("Could not create nvim command");
let instance = NeovimInstance::Embedded(command);
let NeovimSession { neovim: nvim, .. } = NeovimSession::new(instance, NeovimHandler())
.await
.unwrap_or_explained_panic("Could not locate or start the neovim process");
Expand Down Expand Up @@ -289,7 +292,10 @@ mod tests {
settings.readers.force_unlock_write();
}

settings.read_initial_values(&nvim).await;
settings
.read_initial_values(&nvim)
.await
.unwrap_or_explained_panic("Could not read initial values");

let rt1 = nvim.get_var(&v4).await.unwrap();
let rt2 = nvim.get_var(&v5).await.unwrap();
Expand Down

0 comments on commit 8949ceb

Please sign in to comment.