Test an array to include any of the provided elements. The values are tested by identity, not structure. @param searchElements - The values that should be included in the array.
(...searchElements: readonly T[])
| 93 | @param searchElements - The values that should be included in the array. |
| 94 | */ |
| 95 | includesAny(...searchElements: readonly T[]): this { |
| 96 | return this.addValidator({ |
| 97 | message: (value, label) => `Expected ${label} to include any element of \`${JSON.stringify(searchElements)}\`, got \`${JSON.stringify(value)}\``, |
| 98 | validator: value => searchElements.some(element => value.includes(element)), |
| 99 | }); |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | Test an array to be empty. |
no test coverage detected