MCPcopy Create free account
hub / github.com/csskit/csskit / test_stylesheet_metadata_simple

Function test_stylesheet_metadata_simple

crates/css_ast/src/metadata.rs:517–530  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

515
516 #[test]
517 fn test_stylesheet_metadata_simple() {
518 let css = "body { color: red; width: 100px; }";
519 let bump = bumpalo::Bump::new();
520 let lexer = Lexer::new(&CssAtomSet::ATOMS, css);
521 let mut parser = Parser::new(&bump, css, lexer);
522 let stylesheet = parser.parse::<StyleSheet>().unwrap();
523
524 let metadata = stylesheet.metadata();
525
526 assert!(metadata.property_groups.contains(PropertyGroup::Color));
527 assert!(metadata.property_groups.contains(PropertyGroup::Sizing));
528 assert!(metadata.modifies_box());
529 assert!(metadata.has_longhands());
530 }
531
532 #[test]
533 fn test_stylesheet_metadata_with_important() {

Callers

nothing calls this directly

Calls 1

metadataMethod · 0.45

Tested by

no test coverage detected