Files
dioxus/packages/core/tests/boolattrs.rs
T
Tristan F.andJonathan Kelley 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653)
* fix most typos, add crate-ci/typos to CI

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
2024-07-23 17:49:33 -07:00

22 lines
590 B
Rust

use dioxus::dioxus_core::{ElementId, Mutation::*};
use dioxus::prelude::*;
#[test]
fn bool_test() {
let mut app = VirtualDom::new(|| rsx!(div { hidden: false }));
assert_eq!(
app.rebuild_to_vec().sanitize().edits,
[
LoadTemplate { name: "template", index: 0, id: ElementId(1) },
SetAttribute {
name: "hidden",
value: dioxus_core::AttributeValue::Bool(false),
id: ElementId(1,),
ns: None
},
AppendChildren { m: 1, id: ElementId(0) },
]
);
}