diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs
index 2de421290b..1c5d290012 100644
--- a/src/renderer/html_handlebars/hbs_renderer.rs
+++ b/src/renderer/html_handlebars/hbs_renderer.rs
@@ -1322,4 +1322,29 @@ mod tests {
assert_eq!(json!(TextDirection::RightToLeft), json!("rtl"));
assert_eq!(json!(TextDirection::LeftToRight), json!("ltr"));
}
+
+ #[test]
+ fn convert_valid_fontawesome_class() {
+ assert!(convert_fontawesome("").contains("class=\"fa-svg\""));
+ assert!(
+ convert_fontawesome("")
+ .contains("class=\"fa-svg some-class\"")
+ );
+ assert!(convert_fontawesome("").contains("class=\"fa-svg\""));
+ assert!(convert_fontawesome("").contains("class=\"fa-svg\""));
+ }
+
+ #[test]
+ fn convert_invalid_fontawesome_class() {
+ let invalid_fontawesome_i_tag = "";
+ assert_eq!(
+ convert_fontawesome(invalid_fontawesome_i_tag),
+ invalid_fontawesome_i_tag
+ );
+ let non_fontawesome_i_tag = "";
+ assert_eq!(
+ convert_fontawesome(non_fontawesome_i_tag),
+ non_fontawesome_i_tag
+ );
+ }
}