(expected: unknown)
| 247 | ) |
| 248 | }, |
| 249 | toContain(expected: unknown) { |
| 250 | const contains = |
| 251 | typeof actual === `string` |
| 252 | ? actual.includes(String(expected)) |
| 253 | : Array.isArray(actual) |
| 254 | ? actual.some((entry) => deepEqual(entry, expected)) |
| 255 | : false |
| 256 | |
| 257 | assert( |
| 258 | contains, |
| 259 | `Expected ${formatValue(actual)} ${negate ? `not ` : ``}to contain ${formatValue(expected)}`, |
| 260 | ) |
| 261 | }, |
| 262 | toHaveProperty(propertyKey: string) { |
| 263 | const hasProperty = |
| 264 | isObjectLike(actual) && |
nothing calls this directly
no test coverage detected