Test an array to include all 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[])
| 81 | @param searchElements - The values that should be included in the array. |
| 82 | */ |
| 83 | includes(...searchElements: readonly T[]): this { |
| 84 | return this.addValidator({ |
| 85 | message: (value, label) => `Expected ${label} to include all elements of \`${JSON.stringify(searchElements)}\`, got \`${JSON.stringify(value)}\``, |
| 86 | validator: value => searchElements.every(element => value.includes(element)), |
| 87 | }); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | Test an array to include any of the provided elements. The values are tested by identity, not structure. |
no test coverage detected