Skip to content

Commit dbdee8b

Browse files
MukundaKattaOrKoN
authored andcommitted
fix: save WebP responses with the right extension
1 parent e3a5f6b commit dbdee8b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/daemon/client.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,20 @@ describe('daemon client', () => {
107107
const response = await handleResponse(unsupportedContentResponse, 'md');
108108
assert.ok(response.includes('.png'));
109109
});
110+
111+
it('uses the webp extension for WebP images', async () => {
112+
const webpContentResponse = {
113+
content: [
114+
{
115+
type: 'image' as const,
116+
data: 'base64data',
117+
mimeType: 'image/webp',
118+
},
119+
],
120+
structuredContent: {},
121+
};
122+
const response = await handleResponse(webpContentResponse, 'md');
123+
assert.ok(response.includes('.webp'));
124+
});
110125
});
111126
});

0 commit comments

Comments
 (0)