(
container,
alt,
options: MatcherOptions = {},
)
| 14 | const VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i |
| 15 | |
| 16 | const queryAllByAltText: AllByBoundAttribute = ( |
| 17 | container, |
| 18 | alt, |
| 19 | options: MatcherOptions = {}, |
| 20 | ) => { |
| 21 | checkContainerType(container) |
| 22 | return queryAllByAttribute('alt', container, alt, options).filter(node => |
| 23 | VALID_TAG_REGEXP.test(node.tagName), |
| 24 | ) |
| 25 | } |
| 26 | |
| 27 | const getMultipleError: GetErrorFunction<[unknown]> = (c, alt) => |
| 28 | `Found multiple elements with the alt text: ${alt}` |
no test coverage detected