feat(web): host_unreachable phase copy for dm_call_undeliverable (TDD)

This commit is contained in:
Jannis Braun
2026-04-24 00:51:30 +02:00
parent 314df6c5a1
commit 5e509cf3df
2 changed files with 39 additions and 1 deletions
@@ -34,4 +34,24 @@ describe('buildCallUndeliverableToast', () => {
it('legacy two-arg signature still works', () => {
expect(buildCallUndeliverableToast([fail()], true)).toMatch(/Could not reach nova/);
});
it('builds warning copy for host_unreachable (peer_transient_failure)', () => {
const msg = buildCallUndeliverableToast(
[{ reason: 'peer_transient_failure', peerOrigin: 'https://orbit.local', peerLabel: 'Orbit' }],
true,
'host_unreachable',
);
expect(msg.toLowerCase()).toContain('orbit');
expect(msg.toLowerCase()).toContain('unreachable');
});
it('builds warning copy for host_unreachable (peer_rejected)', () => {
const msg = buildCallUndeliverableToast(
[{ reason: 'peer_rejected', peerOrigin: 'https://orbit.local', peerLabel: 'Orbit' }],
true,
'host_unreachable',
);
expect(msg.toLowerCase()).toContain('orbit');
expect(msg.toLowerCase()).toContain('peered');
});
});