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
|
|
@ -58,11 +58,6 @@ pub fn parse_dedup_suffix(stem: &str) -> Option<(&str, u32)> {
|
|||
None
|
||||
}
|
||||
|
||||
/// Checks whether a filename stem has a dedup suffix.
|
||||
pub fn has_dedup_suffix(stem: &str) -> bool {
|
||||
parse_dedup_suffix(stem).is_some()
|
||||
}
|
||||
|
||||
/// Builds a dedup'd filename from a base stem, optional suffix number, and
|
||||
/// extension.
|
||||
///
|
||||
|
|
@ -180,13 +175,6 @@ mod tests {
|
|||
assert_eq!(parse_dedup_suffix("My Script~1"), Some(("My Script", 1)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn has_suffix() {
|
||||
assert!(has_dedup_suffix("Foo~1"));
|
||||
assert!(!has_dedup_suffix("Foo"));
|
||||
assert!(!has_dedup_suffix("Foo~abc"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn build_name_file() {
|
||||
assert_eq!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue