Skip to content

fix: match distinct actual entries in exact deep key assertions - #1882

Open
xiehuanyi wants to merge 1 commit into
chaijs:mainfrom
xiehuanyi:fix/deep-key-one-to-one-20261014
Open

xiehuanyi wants to merge 1 commit into
chaijs:mainfrom
xiehuanyi:fix/deep-key-one-to-one-20261014

Conversation

@xiehuanyi

Copy link
Copy Markdown

Exact .all.deep.keys matching can reuse one actual Map or Set key for multiple structurally equal expected keys. For example, keys {id: 1} and {id: 2} currently pass an expectation of [{id: 1}, {id: 1}], leaving the second actual key unchecked.

Match against a shallow copy of the actual keys and consume each match for exact comparisons. Keep .include and .any behavior. Add Map and Set regressions, negation checks, valid repeated deep-equal keys, and inclusion/any controls.

Validation:

  • Both new collection regressions fail on unchanged main.
  • npm run test-node: 514 tests pass.
  • Chromium browser runner: 513 tests across 9 files pass.
  • Build, normal ESLint/Prettier checks, and git diff --check pass.
  • Optional lint:types reports the same 601 existing diagnostics on main and the patched source, with identical diagnostic multisets. That script is not part of the current CI workflows.

Discovery and implementation: automated OpenAI gpt-6.1-sol source review with xhigh reasoning; no production incident is claimed.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 09:41
@xiehuanyi
xiehuanyi requested a review from a team as a code owner October 14, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants