fix(object): Update toHaveProperty matcher to support nested property paths using dot notation

This commit is contained in:
2025-04-30 18:00:29 +00:00
parent ef5770e41a
commit e7941e7b99
4 changed files with 30 additions and 4 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 2025-04-30 - 2.3.2 - fix(object)
Update toHaveProperty matcher to support nested property paths using dot notation
- Changed toHaveProperty implementation to split property strings on '.' and traverse nested objects
- Fixed value comparison for nested properties by comparing the final drilled value instead of direct property access
- Added tests for nested property access in test/propertyPath.ts
## 2025-04-30 - 2.3.1 - fix(readme)
Improve README documentation with detailed 'Why SmartExpect' benefits section