(src: string)
| 113 | |
| 114 | // Helper function to load an image and return a promise |
| 115 | const loadImage = (src: string): Promise<HTMLImageElement> => { |
| 116 | return new Promise((resolve, reject) => { |
| 117 | const img = new Image(); |
| 118 | img.onload = () => resolve(img); |
| 119 | img.onerror = () => reject(new Error(`Failed to load image: ${src}`)); |
| 120 | img.src = src; |
| 121 | }); |
| 122 | }; |
| 123 | |
| 124 | export const generateReportImage = async ( |
| 125 | report: string, |
no outgoing calls
no test coverage detected