(filePath)
| 15 | |
| 16 | // Function to read image file and convert to data URL |
| 17 | function imageToDataURL(filePath) { |
| 18 | try { |
| 19 | const data = fs.readFileSync(filePath); |
| 20 | const base64 = data.toString('base64'); |
| 21 | return `data:image/png;base64,${base64}`; |
| 22 | } catch (error) { |
| 23 | console.error(`Failed to read image: ${filePath}`, error); |
| 24 | return null; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | // Create a lookup map for actual screenshots |
| 29 | function createActualScreenshotMap() { |
no test coverage detected