Files
WebApp/src/app/features/indicadores/indicadores-identities.spec.ts
T

10 lines
630 B
TypeScript

import { figureIdentity, indicatorIdentity, identityElementId } from './indicadores-identities';
describe('UX-05B identidades', () => {
it('separa dominios, indicadores y figuras sin colisiones por delimitadores', () => {
const ids = [indicatorIdentity('tea', 'a/b'), indicatorIdentity('cacu', 'a/b'), figureIdentity('tea', 'a/b', 'c'), figureIdentity('tea', 'a', 'b/c'), figureIdentity('tea', 'a', 'á')];
expect(new Set(ids).size).toBe(ids.length);
expect(new Set(ids.map(identityElementId)).size).toBe(ids.length);
expect(ids.map(identityElementId).every(id => /^[a-z0-9-]+$/.test(id))).toBe(true);
});
});