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 ', () => {