Skip to content

fix(core): Array matcher missing deep equality - #176

Open
JoseLion wants to merge 1 commit into
stackbuilders:mainfrom
JoseLion:fix/array-matchers-equality
Open

fix(core): Array matcher missing deep equality#176
JoseLion wants to merge 1 commit into
stackbuilders:mainfrom
JoseLion:fix/array-matchers-equality

Conversation

@JoseLion

@JoseLion JoseLion commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the missing deep equality on the following matchers of ArrayAssertion:

  • toHaveSameMembers(expected: T[])
  • toContainAll(...values: T[])
  • toContainAny(...values: T[])

Additionally, it adds a Predicate<T> utility type and the new predicates.ts helper file, intended for generic predicate builders that can help make the code more readable, maintainable, and functional. So far, this helper has only two predicate builders:

  • deepEquals<A, B>(second: B) => Predicate<A>
  • notDeepEquals<A, B>(second: B) => Predicate<A>

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.

1 participant