Skip to content

Commit

Permalink
refactor(test): handle errors for changelog module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Apr 2, 2023
1 parent 2ab2c8f commit ed389b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions git-cliff-core/src/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ mod test {
filter_unconventional: Some(false),
split_commits: Some(false),
commit_preprocessors: Some(vec![CommitPreprocessor {
pattern: Regex::new("<preprocess>").unwrap(),
pattern: Regex::new("<preprocess>")
.expect("failed to compile regex"),
replace: Some(String::from(
"this commit is preprocessed",
)),
Expand Down Expand Up @@ -429,7 +430,7 @@ mod test {
------------"#
)
.replace(" ", ""),
str::from_utf8(&out).unwrap()
str::from_utf8(&out).unwrap_or_default()
);
Ok(())
}
Expand Down Expand Up @@ -543,7 +544,7 @@ chore(deps): fix broken deps
------------"#
)
.replace(" ", ""),
str::from_utf8(&out).unwrap()
str::from_utf8(&out).unwrap_or_default()
);
Ok(())
}
Expand Down

0 comments on commit ed389b7

Please sign in to comment.