fix: validar datas fiscais e iniciar revisao integrada do simulador

This commit is contained in:
2026-10-20 20:03:40 +02:00
parent e69ab1499f
commit 59ab4fe956
10 changed files with 80 additions and 24 deletions
+3
View File
@@ -20,6 +20,9 @@ import {
} from '../../resources/js/lib/simulation-form.ts';
void test('fiscal period range requires and respects exact annual, monthly, quarterly, and one-off dates', () => {
for (const invalid of ['2026-99-99', '2026-02-30', '2026-00-01', '2026-01-00', '']) {
assert.equal(getFiscalPeriodRange({ fiscal_period: '2026', fiscal_periodicity: 'one_off', fiscal_reference_date: invalid }), null);
}
assert.deepEqual(
getFiscalPeriodRange({
fiscal_period: '2024',