Merge branch 'master' into intigrate-collect-assets
This commit is contained in:
1 parent
ffb5de91d1
commit
f976e08f71
379 files changed
+1962
-13517
No files matched your search
@@ -0,0 +1,37 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
#[test]
|
||||
fn static_boolean_attributs() {
|
||||
fn app(cx: Scope) -> Element {
|
||||
render! {
|
||||
div { hidden: "false" }
|
||||
div { hidden: "true" }
|
||||
}
|
||||
}
|
||||
|
||||
let mut dom = VirtualDom::new(app);
|
||||
_ = dom.rebuild();
|
||||
|
||||
assert_eq!(
|
||||
dioxus_ssr::render(&dom),
|
||||
r#"<div></div><div hidden="true"></div>"#
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn dynamic_boolean_attributs() {
|
||||
fn app(cx: Scope) -> Element {
|
||||
render! {
|
||||
div { hidden: false }
|
||||
div { hidden: true }
|
||||
}
|
||||
}
|
||||
|
||||
let mut dom = VirtualDom::new(app);
|
||||
_ = dom.rebuild();
|
||||
|
||||
assert_eq!(
|
||||
dioxus_ssr::render(&dom),
|
||||
r#"<div></div><div hidden=true></div>"#
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user