Add test to check if minified theme are handled correctly
This commit is contained in:
parent
c8e567ddc8
commit
109260f8f0
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user