Skip to content

Commit

Permalink
Add more detail to failed assertion err msg
Browse files Browse the repository at this point in the history
  • Loading branch information
diehuxx committed Sep 17, 2024
1 parent 91f8cc4 commit b0d082e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion crates/web5/src/credentials/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,10 @@ mod tests {

match result {
Err(Web5Error::Network(err_msg)) => {
assert!(err_msg.contains("failed to lookup address information"))
assert!(
err_msg.contains("failed to lookup address information"),
"Error message is: {}", err_msg
)
}
_ => panic!(
"expected Web5Error::Network with specific message but got {:?}",
Expand Down
5 changes: 4 additions & 1 deletion crates/web5/src/credentials/verifiable_credential_1_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,10 @@ mod tests {

match result {
Err(Web5Error::Network(err_msg)) => {
assert!(err_msg.contains("failed to lookup address information"))
assert!(
err_msg.contains("failed to lookup address information"),
"Error message is: {}", err_msg
)
}
_ => panic!(
"expected Web5Error::Network with specific message but got {:?}",
Expand Down

0 comments on commit b0d082e

Please sign in to comment.