mirror of
https://github.com/Hopiu/lychee.git
synced 2026-03-17 05:00:26 +00:00
Remove JSON output files even on test failures
This commit is contained in:
parent
08dabb06b2
commit
0d25e524bf
1 changed files with 2 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ mod cli {
|
|||
let test_path = fixtures_path().join($test_file);
|
||||
let outfile = format!("{}.json", uuid::Uuid::new_v4());
|
||||
|
||||
cmd$(.arg($arg))*.arg("--output").arg(&outfile).arg("--format").arg("json").arg(test_path).assert().success();
|
||||
let result = cmd$(.arg($arg))*.arg("--output").arg(&outfile).arg("--format").arg("json").arg(test_path).assert();
|
||||
|
||||
let output = std::fs::read_to_string(&outfile)?;
|
||||
std::fs::remove_file(outfile)?;
|
||||
|
|
@ -112,6 +112,7 @@ mod cli {
|
|||
let actual: Value = serde_json::from_str(&output)?;
|
||||
let expected: Value = serde_json::to_value(&$expected)?;
|
||||
|
||||
result.success();
|
||||
assert_json_include!(actual: actual, expected: expected);
|
||||
Ok(())
|
||||
}};
|
||||
|
|
|
|||
Loading…
Reference in a new issue