Test an array to have a specific length. @param length - The length of the array.
(length: number)
| 19 | @param length - The length of the array. |
| 20 | */ |
| 21 | length(length: number): this { |
| 22 | return this.addValidator({ |
| 23 | message: (value, label) => `Expected ${label} to have length \`${length}\`, got \`${value.length}\``, |
| 24 | validator: value => value.length === length, |
| 25 | }); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | Test an array to have a minimum length. |
no test coverage detected