Skip to content

Commit

Permalink
docs: update toIncludeSameMembers
Browse files Browse the repository at this point in the history
Co-authored-by: Keegan Witt <[email protected]>
  • Loading branch information
devjiwonchoi and keeganwitt committed Oct 11, 2023
1 parent 1b9bfaf commit 9467c0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/docs/matchers/Array.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Use `.toIncludeAllMembers` when checking if an `Array` contains all of the membe

### .toIncludeAllPartialMembers([members])

Use `.toIncludeAllPartialMembers` when checking if an `Array` contains all of the partial members of a given set.
Use `.toIncludeAllPartialMembers` when checking if an `Array` contains all of the partial members of a given set, in any order.

<TestFile name="toIncludeAllPartialMembers">
{`test('passes when given array values match the partial members of the set', () => {
Expand All @@ -62,13 +62,13 @@ Use `.toIncludeAnyMembers` when checking if an `Array` contains any of the membe

### .toIncludeSameMembers([members])

Use `.toIncludeSameMembers` when checking if two arrays contain equal values, in any order.
Use `.toIncludeSameMembers` when checking if two arrays contain members in exact match, in any order.

<TestFile name="toIncludeSameMembers">
{`test('passes when arrays match in a different order', () => {
expect([1, 2, 3]).toIncludeSameMembers([3, 1, 2]);
expect([{ foo: 'bar' }, { baz: 'qux' }]).toIncludeSameMembers([{ baz: 'qux' }, { foo: 'bar' }]);
expect([{ foo: 'bar' }, { baz: 'qux' }, { fred: 'thud' }]).not.toIncludeSameMembers([{ baz: 'qux' }, { foo: 'bar' }]);
expect([1, 2, 2]).not.toIncludeSameMembers([2, 1]);
});`}
</TestFile>

Expand Down

0 comments on commit 9467c0b

Please sign in to comment.