feat(indicadores): habilitar dashboards Angular TEA CaCu y CaMa
This commit is contained in:
@@ -21,3 +21,14 @@ describe('Periodos y visibilidad conservadora', () => {
|
||||
expect(hasNoVisibleValues({ data: [{ type: 'heatmap', z: [] }], layout: {} })).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
it('deduplica meses en orden estable y valida el calendario sin mezclar tipos', () => {
|
||||
expect(parsePeriodos('2025-12, 2025-01,2025-12', 'mes')).toEqual(['2025-12', '2025-01']);
|
||||
for (const value of ['', '2025-00', '2025-13', '2025-1', '2025-S1', '2025-01,2025-S1']) {
|
||||
expect(parsePeriodos(value, 'mes')).toBeNull();
|
||||
}
|
||||
expect(parsePeriodos('2025-S1,2025-01', 'semestre')).toBeNull();
|
||||
});
|
||||
it('no interpreta NaN ni null como porcentajes cero', () => {
|
||||
expect(hasNoVisibleValues({ data: [{ y: [NaN, null] }], layout: {} })).toBe(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user