(lines: string[], options?: Options)
| 167 | const PASS_TEXT_MATCH = true |
| 168 | |
| 169 | export function assertTextRendered(lines: string[], options?: Options) { |
| 170 | return (node: HTMLDivElement = getCaptureNode()) => |
| 171 | PASS_TEXT_MATCH |
| 172 | ? expect(true).toBe(true) |
| 173 | : recognizeImage(node, options).then((text) => { |
| 174 | expect(lines.every((line) => text.includes(line))).toBe(true) |
| 175 | }) |
| 176 | } |
| 177 | |
| 178 | export async function recognizeImage(node: HTMLDivElement, options?: Options) { |
| 179 | return toPng(node, options) |
no test coverage detected
searching dependent graphs…