mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-02 08:59:14 +00:00
32 lines
951 B
Rust
32 lines
951 B
Rust
// use dioxus::dioxus_core::Mutation::*;
|
|
use dioxus::prelude::*;
|
|
|
|
#[test]
|
|
fn multiroot() {
|
|
let mut dom = VirtualDom::new(|| {
|
|
rsx! {
|
|
div { "Hello a" }
|
|
div { "Hello b" }
|
|
div { "Hello c" }
|
|
}
|
|
});
|
|
|
|
// note: we dont test template edits anymore
|
|
let _templates = dom.rebuild_to_vec().santize().templates;
|
|
|
|
// assert_eq!(
|
|
// dom.rebuild_to_vec().santize().templates,
|
|
// [
|
|
// CreateElement { name: "div" },
|
|
// CreateStaticText { value: "Hello a" },
|
|
// AppendChildren { m: 1 },
|
|
// CreateElement { name: "div" },
|
|
// CreateStaticText { value: "Hello b" },
|
|
// AppendChildren { m: 1 },
|
|
// CreateElement { name: "div" },
|
|
// CreateStaticText { value: "Hello c" },
|
|
// AppendChildren { m: 1 },
|
|
// SaveTemplate { name: "template", m: 3 }
|
|
// ]
|
|
// )
|
|
}
|