Expand description
Test factory helpers for widget extension authors.
Provides TestEnv for setting up a render environment and
node / node_with_props / node_with_children for
constructing test tree nodes.
§Example
ⓘ
use toddy_core::testing::*;
use toddy_core::prelude::*;
let test = TestEnv::default();
let env = test.env();
let element = my_extension.render(&node, &env);Structs§
- TestEnv
- Owns all the dependencies needed to construct a
WidgetEnvfor testing extensionrender()methods.
Functions§
- node
- Create a minimal
TreeNodewith empty props and no children. - node_
with_ children - Create a
TreeNodewith children and empty props. - node_
with_ props - Create a
TreeNodewith the given props and no children.