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

Function test_diagnostics_with_size

crates/csskit_ast/src/collector/tests.rs:134–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133#[test]
134fn test_diagnostics_with_size() {
135 let bump = Bump::new();
136 let source = r#"
137 selector-list {
138 level: advice;
139 diagnostic: "Selector list has " size() " selectors";
140 }
141 "#;
142 let css_source = ".foo {}";
143
144 let (_, diagnostics) = run(&bump, source, css_source);
145 assert_eq!(diagnostics.len(), 1);
146 assert_eq!(diagnostics[0].message, "Selector list has 1 selectors");
147 assert_eq!(diagnostics[0].severity, ResolvedDiagnosticLevel::Advice);
148}
149
150#[test]
151fn test_diagnostics_with_size_various() {

Callers

nothing calls this directly

Calls 1

runFunction · 0.70

Tested by

no test coverage detected