feat(channels): emit line and zalo binary attachment fallback notices

This commit is contained in:
William Valentin
2026-02-17 10:36:47 -08:00
parent ac29789d89
commit 2007c0c060
5 changed files with 34 additions and 2 deletions
+3 -1
View File
@@ -95,9 +95,11 @@ describe('LineAdapter', () => {
],
});
expect(mockFetch).toHaveBeenCalledTimes(2);
expect(mockFetch).toHaveBeenCalledTimes(3);
const secondBody = JSON.parse(String(mockFetch.mock.calls[1]?.[1]?.body ?? '{}'));
const thirdBody = JSON.parse(String(mockFetch.mock.calls[2]?.[1]?.body ?? '{}'));
expect(secondBody.messages?.[0]?.text).toBe('file.txt: https://example.com/file.txt');
expect(thirdBody.messages?.[0]?.text).toBe('[LINE] Binary attachment not uploaded yet: attachment (image/png).');
expect(warnSpy).toHaveBeenCalledWith('LINE: skipping attachment data (image/png) — upload not implemented');
warnSpy.mockRestore();
});