{{ message }}
Repository navigation
fix(diasuteis): corrige feriados em intervalos entre anos - #922
Merged
Merged
Conversation
lucianopf
marked this pull request as ready for review
October 15, 2026 11:50
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Descrição
Corrige o erro 500 em intervalos que atravessam anos com feriados nacionais ativados. Array.flatMap passa o índice como segundo argumento; ao receber getHolidays diretamente, esse índice era interpretado como UF. A chamada agora repassa somente o ano.
Acrescenta dois testes HTTP de regressão: intervalo entre anos com feriados ativados e com feriados desativados.
Tipo de mudança
Compatibilidade
Validação local
Validação conjunta das duas correções preparadas, com TZ=UTC:
PR aberto como draft para revisão.
Como testar
Com a aplicação iniciada, executar:
TZ=UTC npm test -- tests/diasuteis-v1.test.js --coverage.enabled=falseAntes da correção: 1 falha (HTTP 500) e 9 testes aprovados. Depois: 10 aprovados.
Relação com outros PRs
Complementar ao #907: este PR corrige a passagem indevida do índice como UF; não inclui a mudança de fuso horário proposta lá. A validação HTTP deste PR foi feita com TZ=UTC. Uma verificação isolada do handler combinando as duas correções passou em America/Sao_Paulo; isso não representa uma execução HTTP completa da combinação.