Unify IPC outbound delivery through work items

This commit is contained in:
ejclaw
2026-04-28 23:36:34 +09:00
parent 83411d0961
commit d2a27ecf34
5 changed files with 371 additions and 48 deletions

View File

@@ -818,14 +818,14 @@ describe('DiscordChannel', () => {
).rejects.toThrow('Channel not found');
});
it('does nothing when client is not initialized', async () => {
it('rejects when client is not initialized', async () => {
const opts = createTestOpts();
const channel = new DiscordChannel('test-token', opts);
// Don't connect — client is null
await channel.sendMessage('dc:1234567890123456', 'No client');
// No error, no API call
await expect(
channel.sendMessage('dc:1234567890123456', 'No client'),
).rejects.toThrow('Discord client not initialized');
});
it('splits messages exceeding 2000 characters', async () => {