mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-02 17:09:11 +00:00
21 lines
424 B
Rust
21 lines
424 B
Rust
use html_parser::Dom;
|
|
|
|
#[test]
|
|
fn web_components_translate() {
|
|
let html = r#"
|
|
<div>
|
|
<my-component></my-component>
|
|
</div>
|
|
"#
|
|
.trim();
|
|
|
|
let dom = Dom::parse(html).unwrap();
|
|
|
|
let body = rsx_rosetta::rsx_from_html(&dom);
|
|
|
|
let out = dioxus_autofmt::write_block_out(body).unwrap();
|
|
|
|
let expected = r#"
|
|
div { my-component {} }"#;
|
|
pretty_assertions::assert_eq!(&out, &expected);
|
|
}
|