-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Description
🚀 Feature Request
Adding a built-in arrayOf matcher would be a nice addition to generic assertions.
Example
An example from Jest documentation:
test('all elements in array are strings', () => {
expect(['apple', 'banana', 'cherry']).toEqual(
expect.arrayOf(expect.any(String)),
);
});Motivation
arrayOfis the only asymmetric matcher that exists in Jest's expect and not in Playwright. It can be useful for API tests, to ensure that an Object has an Array of "something".
Metadata
Metadata
Assignees
Labels
No labels