Test a Map to include any of the provided keys. The keys are tested by identity, not structure. @param keys - The keys that could be a key in the Map.
(...keys: readonly T1[])
| 68 | @param keys - The keys that could be a key in the Map. |
| 69 | */ |
| 70 | hasAnyKeys(...keys: readonly T1[]): this { |
| 71 | return this.addValidator({ |
| 72 | message: (_, label) => `Expected ${label} to have any key of \`${JSON.stringify(keys)}\``, |
| 73 | validator: map => keys.some(key => map.has(key)), |
| 74 | }); |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | Test a Map to include all the provided values. The values are tested by identity, not structure. |
no test coverage detected