Skip to content

test(matchers): honor SkipCompare in address matcher - #406

Closed
huklaa wants to merge 1 commit into
circlefin:mainfrom
huklaa:fix-399-skippable-custom-matchers
Closed

huklaa wants to merge 1 commit into
circlefin:mainfrom
huklaa:fix-399-skippable-custom-matchers

Conversation

@huklaa

@huklaa huklaa commented Sep 14, 2026

Copy link
Copy Markdown

Summary

  • Make the custom "addressEqual" matcher honor the declared "SkipCompare" sentinel.
  • Add regression coverage confirming that address comparison is skipped when requested.

Root cause

The TypeScript declaration accepts "SkipCompare" as an argument to "addressEqual", but the runtime implementation passes the sentinel to "isAddressable()" before checking "isSkipCompare(other)".

This causes a valid, compiling assertion to fail because the sentinel object is rejected as an invalid address or account.

Changes

  • Return early from "addressEqual" when the expected value is "SkipCompare".
  • Add focused regression coverage for "addressEqual(skipCompare)".
  • Preserve normal address, account-object, negation, and invalid-input behavior.

Testing

  • Matcher suite: 16 passing
  • Focused reproducer: passed
  • ESLint: passed
  • Prettier: passed
  • "git diff --check": passed

Scope

This is separate from #399 and #400, which concern the "hexEqual" matcher.

Closes: #407

Signed-off-by: Hukla <129692708+huklaa@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Hi @huklaa,

Thank you for your interest in contributing to Arc Node.

This PR has been automatically closed because it does not reference a GitHub issue. All PRs must reference an existing issue using the format Closes: #XXX.

To contribute properly:

  1. Find an existing issue you'd like to work on, or open a new issue describing your proposed change
  2. Comment on the issue requesting assignment and wait for maintainer approval
  3. Only submit a PR after you have been assigned to the issue

Please see our CONTRIBUTING.md for more details.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Unsigned Commits Detected

The following commits are missing a verified signature:

  • 2b32fa4 by Hukla

How to fix: Sign your commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: addressEqual accepts SkipCompare in TypeScript but rejects it at runtime

1 participant