@serenity-js/assertions
Version:
Serenity/JS universal assertion library supporting all types of functional tests, including both web and REST API scenarios
24 lines • 878 B
TypeScript
import { Expectation } from '@serenity-js/core';
/**
* Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when all the items of the actual array of `Item[]`
* meet the `expectation`.
*
* ## Ensuring that all the items in an array meet the expectation
*
* ```ts
* import { actorCalled } from '@serenity-js/core'
* import { Ensure, containItemsWhereEachItem, endsWith } from '@serenity-js/assertions'
*
* const items = [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday' ]
*
* await actorCalled('Ester').attemptsTo(
* Ensure.that(items, containItemsWhereEachItem(endsWith('day'))),
* )
* ```
*
* @param expectation
*
* @group Expectations
*/
export declare function containItemsWhereEachItem<Actual>(expectation: Expectation<Actual>): Expectation<Actual[]>;
//# sourceMappingURL=containItemsWhereEachItem.d.ts.map