Add test to check if minified theme are handled correctly

This commit is contained in:
Guillaume Gomez 2020-02-12 14:39:40 +01:00
parent c8e567ddc8
commit 109260f8f0

View File

@ -102,3 +102,16 @@ fn check_invalid_css() {
let events = load_css_events(b"*");
assert_eq!(events.len(), 0);
}
#[test]
fn test_with_minification() {
let text = include_str!("../html/static/themes/dark.css");
let minified = minifier::css::minify(&text).expect("CSS minification failed");
let against = load_css_paths(text.as_bytes());
let other = load_css_paths(minified.as_bytes());
let mut ret = Vec::new();
get_differences(&against, &other, &mut ret);
assert!(ret.is_empty());
}