Skip to content
This repository was archived by the owner on Jan 10, 2026. It is now read-only.

Commit 300e369

Browse files
committed
Add legend to diff
1 parent e94f712 commit 300e369

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ async fn run_test(file: &Path, wasm: &Path) -> Result<()> {
400400
let received_str = serde_json::to_string_pretty(&resp_value).unwrap();
401401

402402
return Err(
403-
format!("Diff:\n{}", pretty_print_diff(&expected_str, &received_str)).into(),
403+
format!("Expected response does not match received response:\n{}\n\n{}", pretty_print_diff(&expected_str, &received_str), "Legend: \n\"+\" - Present in expected but not in received\n\"-\" - Present in received but not in expected".cyan()).into(),
404404
);
405405
}
406406
} else if !serde_json::to_value(&resp).unwrap().is_null() {

0 commit comments

Comments
 (0)