Skip to content

fix: avoid misleading diffs for deep unordered members - #1875

Open
vhinayindia wants to merge 1 commit into
chaijs:mainfrom
vhinayindia:fix/chai-1462-unordered-members-diff
Open

vhinayindia wants to merge 1 commit into
chaijs:mainfrom
vhinayindia:fix/chai-1462-unordered-members-diff

Conversation

@vhinayindia

Copy link
Copy Markdown

Deep member assertions ignore element order, so positional diffs can imply that matching members differ when arrays are arranged differently.

Disable reporter diffs for deep unordered member assertions while preserving the assertion message. Ordered deep comparisons and shallow member assertions keep their diffs.

Fixes #1462.

@vhinayindia
vhinayindia requested a review from a team as a code owner October 6, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comparing deep members between two different unsorted arrays doesn't produce accurate errors

1 participant