Skip to main content

ArrayLength

Matches an Array whose length is within the specified range (or 1-infinity if not specified).

import { matchers } from '@contract-case/case-definition-dsl'

new matchers.arrays.ArrayLength(options: ArrayLengthOptions)

Parameters

NameTypeDescription
optionsmatchers.ArrayLengthOptionsAn ArrayLengthOptions object with optional minLength (default 1) and maxLength (default infinity) properties.