From 2b32fa448e8597e4c039fd82a4a8ef61e2940efb Mon Sep 17 00:00:00 2001 From: Hukla <129692708+huklaa@users.noreply.github.com> Date: Mon, 14 Sep 2026 17:36:16 +0300 Subject: [PATCH] test(matchers): honor SkipCompare in address matcher Signed-off-by: Hukla <129692708+huklaa@users.noreply.github.com> --- tests/helpers/matchers/Address.ts | 3 +++ tests/helpers/matchers/index.test.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tests/helpers/matchers/Address.ts b/tests/helpers/matchers/Address.ts index 11e2a7ff..7949f29e 100644 --- a/tests/helpers/matchers/Address.ts +++ b/tests/helpers/matchers/Address.ts @@ -87,6 +87,9 @@ export function supportAddressEqual(Assertion: Chai.AssertionStatic, utils: Chai function addressEqual(this: Chai.AssertionPrototype, other: unknown, message: string = '') { const subject = utils.flag(this, 'object') as unknown + if (isSkipCompare(other)) { + return + } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access const isNegated = (this as any).__flags.negate === true diff --git a/tests/helpers/matchers/index.test.ts b/tests/helpers/matchers/index.test.ts index a0c88fdd..a5ba2cee 100644 --- a/tests/helpers/matchers/index.test.ts +++ b/tests/helpers/matchers/index.test.ts @@ -96,6 +96,10 @@ describe('matchers', () => { /test prefix.*"0x3" is not a valid address or account/, ) }) + + it('supports skipping the expected value', () => { + expect('0x4e59b44847b379578588920cA78FbF26c0B4956C').to.be.addressEqual(skipCompare) + }) }) describe('skippable ', () => {