feat: add carrier-aware signature retirement alerts
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import {
|
||||
isChannelCarrierCompatible,
|
||||
legacyCarrierFromCapabilities,
|
||||
normalizeChannelCarriers,
|
||||
} from './channels.helpers';
|
||||
|
||||
describe('channel carrier capabilities', () => {
|
||||
it('preserves the legacy default when an old caller omits carrier fields', () => {
|
||||
expect(normalizeChannelCarriers()).toEqual(['mobile']);
|
||||
});
|
||||
|
||||
it('expands a historical three-network channel without inventing data for partial capabilities', () => {
|
||||
expect(normalizeChannelCarriers(undefined, 'all')).toEqual(['mobile', 'unicom', 'telecom']);
|
||||
expect(normalizeChannelCarriers(['telecom', 'mobile'], 'all')).toEqual(['mobile', 'telecom']);
|
||||
expect(legacyCarrierFromCapabilities(['mobile', 'telecom'])).toBe('multi');
|
||||
});
|
||||
|
||||
it('checks a group carrier against the new multi-select capability list', () => {
|
||||
expect(isChannelCarrierCompatible('multi', 'mobile', ['mobile', 'telecom'])).toBe(true);
|
||||
expect(isChannelCarrierCompatible('multi', 'unicom', ['mobile', 'telecom'])).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user