UNPKG

@case-contract-testing/case

Version:

Next-generation contract testing suite

33 lines (32 loc) 1.43 kB
import { type AnyCaseNodeOrData, type CoreArrayEachEntryMatches, type CoreArrayLengthMatcher, type CoreArrayContainsMatch, type CoreShapedArrayMatcher } from '../../../entities/types'; type ArrayLengthOptions = { minLength?: number; maxLength?: number; }; /** * Matches an array where each element matches the provided matcher. * * @param matcher - The example object, array, primitive or matcher to match against */ export declare const arrayEachEntryMatches: (matcher: AnyCaseNodeOrData, example?: Array<AnyCaseNodeOrData>) => CoreArrayEachEntryMatches; /** * Matches an Array whose length is within a certain range. * * @param options - `ArrayLengthOptions { minLength?: number; maxLength?: number }` */ export declare const arrayLength: (options: ArrayLengthOptions) => CoreArrayLengthMatcher; /** * Matches an Array which contains elements that match the given matchers. * * Note that two different matchers may be satisfied by the same item in the array. * * @param matchers - any number of matchers, each of which must be found inside the array. */ export declare const arrayContains: (...matchers: AnyCaseNodeOrData[]) => CoreArrayContainsMatch; /** * Matches an Array which starts with the provided array * * @param matchers - An array of matchers that describes the start of the array */ export declare const arrayStartsWith: (matchers: AnyCaseNodeOrData[]) => CoreShapedArrayMatcher; export {};