Skip to content

Commit 846002a

Browse files
committed
Fix coverage
1 parent 6095a2d commit 846002a

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

libs/extractor/src/lib.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5183,6 +5183,29 @@ globalCss({
51835183
}
51845184
]
51855185
})
5186+
"#,
5187+
ExtractOption {
5188+
package: "@devup-ui/core".to_string(),
5189+
css_file: None
5190+
}
5191+
)
5192+
.unwrap()
5193+
));
5194+
5195+
reset_class_map();
5196+
assert_debug_snapshot!(ToBTreeSet::from(
5197+
extract(
5198+
"test.tsx",
5199+
r#"import { globalCss } from "@devup-ui/core";
5200+
globalCss({
5201+
fontFaces: [
5202+
{
5203+
fontFamily: undefined,
5204+
src: "url('/fonts/Roboto-Regular.ttf')",
5205+
fontWeight: 400,
5206+
}
5207+
]
5208+
})
51865209
"#,
51875210
ExtractOption {
51885211
package: "@devup-ui/core".to_string(),
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
source: libs/extractor/src/lib.rs
3+
expression: "ToBTreeSet::from(extract(\"test.tsx\",\nr#\"import { globalCss } from \"@devup-ui/core\";\nglobalCss({\n fontFaces: [\n {\n fontFamily: undefined,\n src: \"url('/fonts/Roboto-Regular.ttf')\",\n fontWeight: 400,\n }\n ]\n})\n\"#,\nExtractOption\n{ package: \"@devup-ui/core\".to_string(), css_file: None }).unwrap())"
4+
---
5+
ToBTreeSet {
6+
styles: {
7+
FontFace(
8+
ExtractFontFace {
9+
file: "test.tsx",
10+
properties: {
11+
"font-weight": "400",
12+
"src": "url('/fonts/Roboto-Regular.ttf')",
13+
},
14+
},
15+
),
16+
},
17+
code: "import \"@devup-ui/core/devup-ui.css\";\n;\n",
18+
}

0 commit comments

Comments
 (0)