UNPKG

@serenity-js/assertions

Version:

Serenity/JS universal assertion library supporting all types of functional tests, including both web and REST API scenarios

24 lines 864 B
import { Expectation } from '@serenity-js/core'; /** * Produces an [expectation](https://serenity-js.org/api/core/class/Expectation/) that is met when the actual array of `Item[]` contains * at least one `Item` for which the `expectation` is met. * * ## Ensuring that at least one item in an array meets the expectation * * ```ts * import { actorCalled } from '@serenity-js/core' * import { Ensure, containAtLeastOneItemThat, isGreaterThan } from '@serenity-js/assertions' * * const items = [ 10, 15, 20 ] * * await actorCalled('Ester').attemptsTo( * Ensure.that(items, containAtLeastOneItemThat(isGreaterThan(18))), * ) * ``` * * @param expectation * * @group Expectations */ export declare function containAtLeastOneItemThat<Item>(expectation: Expectation<Item>): Expectation<Item[]>; //# sourceMappingURL=containAtLeastOneItemThat.d.ts.map