Skip to content

Commit

Permalink
fix: false positive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Jul 26, 2024
1 parent 76ab19a commit ea4059c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions znap-cli/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,15 @@ pub fn start_server(
}

pub fn run_test_suite() {
std::process::Command::new("npm")
let output = std::process::Command::new("npm")
.arg("run")
.arg("test")
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.spawn()
.map_err(anyhow::Error::from)
.expect("Should be able to run tests")
.wait_with_output()
.output()
.expect("Should wait until the tests are over");

if !output.status.success() {
panic!("Test failed: {}", String::from_utf8_lossy(&output.stdout));
}
}

pub fn wait_for_server(address: &str, port: &u16, protocol: &str) {
Expand Down

0 comments on commit ea4059c

Please sign in to comment.