mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor Reconciler tests and update path handling logic
- Updated test descriptions in `diff.spec.lua` and `diff.stress.spec.lua` to reflect changes in behavior regarding duplicate-named children in both real and virtual DOM contexts. - Adjusted assertions to ensure that duplicate-named children are correctly removed or added based on the new matching logic. - Refactored `hydrate.lua` and `matching.lua` to streamline the matching process by removing unnecessary parameters, enhancing clarity and maintainability. - Updated metadata references in various test files to include the `.model.json5` extension for consistency in path handling. These changes improve the accuracy of reconciliation tests and enhance the overall robustness of the Reconciler's path handling logic.
This commit is contained in:
parent
3ad3c21c01
commit
bb9d241253
18 changed files with 129 additions and 94 deletions
|
|
@ -3,6 +3,8 @@ source: tests/rojo_test/syncback_util.rs
|
|||
expression: normalized_stdout
|
||||
---
|
||||
Writing OnlyOneCopy/child_of_one.luau
|
||||
Writing ReplicatedStorage/OnlyOneCopy/child_of_one.luau
|
||||
Writing ReplicatedStorage/child_replicated_storage.luau
|
||||
Writing ReplicatedStorage/OnlyOneCopy
|
||||
Removing OnlyOneCopy/.gitkeep
|
||||
Removing ReplicatedStorage/.gitkeep
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@
|
|||
source: tests/rojo_test/syncback_util.rs
|
||||
expression: normalized_stdout
|
||||
---
|
||||
Writing src/ChildWithDuplicates/DuplicateChild/.gitkeep
|
||||
Writing src/ChildWithDuplicates/DuplicateChild~1/init.meta.json5
|
||||
Writing src/ChildWithoutDuplicates/Child/.gitkeep
|
||||
Writing src/ChildWithDuplicates
|
||||
Writing src/ChildWithDuplicates/DuplicateChild
|
||||
Writing src/ChildWithDuplicates/DuplicateChild~1
|
||||
Writing src/ChildWithoutDuplicates
|
||||
Writing src/ChildWithoutDuplicates/Child
|
||||
Removing src/ChildWithDuplicates/.gitkeep
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@ expression: normalized_stdout
|
|||
---
|
||||
Writing default.project.json5
|
||||
Writing src/model_json.model.json5
|
||||
Writing src/project_node.model.json5
|
||||
Writing src/rbxm.rbxm
|
||||
Writing src/rbxmx.rbxmx
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ expression: container.model.json5
|
|||
{
|
||||
attributes: {
|
||||
Rojo_Id: "value_1",
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_1"
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_1.model.json5"
|
||||
},
|
||||
className: "ObjectValue",
|
||||
name: "value_1"
|
||||
|
|
@ -15,7 +15,7 @@ expression: container.model.json5
|
|||
{
|
||||
attributes: {
|
||||
Rojo_Id: "value_1",
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_2"
|
||||
Rojo_Ref_Value: "ReplicatedStorage/container/value_2.model.json5"
|
||||
},
|
||||
className: "ObjectValue",
|
||||
name: "value_2"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/pointer.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/target"
|
||||
Rojo_Ref_Value: "ReplicatedStorage/target.txt"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer1.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target1"
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target1.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer2.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target2"
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target2.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ expression: src/Pointer3.model.json5
|
|||
---
|
||||
{
|
||||
attributes: {
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target3"
|
||||
Rojo_Ref_Value: "ReplicatedStorage/Target3.model.json5"
|
||||
},
|
||||
className: "ObjectValue"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue