feat(web): host_unreachable phase copy for dm_call_undeliverable (TDD)
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user