make all core tests compile
This commit is contained in:
1 parent
a9d09d858b
commit
fd0a53ab63
21 files changed
+123
-148
No files matched your search
@@ -5,13 +5,15 @@ use dioxus::prelude::*;
|
||||
/// Ensure no issues with not calling rebuild_to_vec
|
||||
#[test]
|
||||
fn root_node_isnt_null() {
|
||||
let dom = VirtualDom::new(|cx| render!("Hello world!"));
|
||||
let dom = VirtualDom::new(|| render!("Hello world!"));
|
||||
|
||||
let scope = dom.base_scope();
|
||||
|
||||
// We haven't built the tree, so trying to get out the root node should fail
|
||||
assert!(scope.try_root_node().is_none());
|
||||
|
||||
// The height should be 0
|
||||
assert_eq!(scope.height(), 0);
|
||||
dom.in_runtime(|| {
|
||||
// The height should be 0
|
||||
assert_eq!(ScopeId::ROOT.height(), 0);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user