(path: string, processedImage?: { base64: string; mediaType: string })
| 20 | } |
| 21 | |
| 22 | const createPendingImage = (path: string, processedImage?: { base64: string; mediaType: string }): PendingImageAttachment => ({ |
| 23 | kind: 'image', |
| 24 | path, |
| 25 | filename: path.split('/').pop() ?? 'image.png', |
| 26 | status: 'ready', |
| 27 | ...(processedImage && { processedImage }), |
| 28 | }) |
| 29 | |
| 30 | describe('processImagesForMessage', () => { |
| 31 | test('uses pre-processed image data from pendingImages without re-reading from disk', async () => { |
no outgoing calls
no test coverage detected