wip: fragment diffing working
This commit is contained in:
1 parent
0266dfdc05
commit
4dd9a616a5
13 files changed
+489
-258
No files matched your search
@@ -28,13 +28,15 @@ fn nested_passthru_creates() {
|
||||
assert_eq!(
|
||||
edits.edits,
|
||||
[
|
||||
LoadTemplate { name: "template", index: 0 },
|
||||
LoadTemplate { name: "template", index: 0, id: ElementId(1) },
|
||||
AppendChildren { m: 1 },
|
||||
]
|
||||
)
|
||||
}
|
||||
|
||||
/// Should load all the templates and append them
|
||||
///
|
||||
/// Take note on how we don't spit out the template for child_comp since it's entirely dynamic
|
||||
#[test]
|
||||
fn nested_passthru_creates_add() {
|
||||
fn app(cx: Scope) -> Element {
|
||||
@@ -64,15 +66,20 @@ fn nested_passthru_creates_add() {
|
||||
assert_eq!(
|
||||
dom.rebuild().santize().edits,
|
||||
[
|
||||
LoadTemplate { name: "template", index: 0 },
|
||||
LoadTemplate { name: "template", index: 0 },
|
||||
LoadTemplate { name: "template", index: 0 },
|
||||
LoadTemplate { name: "template", index: 1 },
|
||||
// load 1
|
||||
LoadTemplate { name: "template", index: 0, id: ElementId(1) },
|
||||
// load 2
|
||||
LoadTemplate { name: "template", index: 0, id: ElementId(2) },
|
||||
// load 3
|
||||
LoadTemplate { name: "template", index: 0, id: ElementId(3) },
|
||||
// load div that contains 4
|
||||
LoadTemplate { name: "template", index: 1, id: ElementId(4) },
|
||||
AppendChildren { m: 4 },
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/// note that the template is all dynamic roots - so it doesn't actually get cached as a template
|
||||
#[test]
|
||||
fn dynamic_node_as_root() {
|
||||
fn app(cx: Scope) -> Element {
|
||||
|
||||
Reference in new issue
Block a user