{{ message }}
Repository navigation
fix(api): corrige cálculo de dias úteis e estabiliza teste de ISBN - #907
Open
christophergouveia wants to merge 2 commits into
Open
christophergouveia wants to merge 2 commits into
christophergouveia wants to merge 2 commits into
Conversation
2 tasks done
This branch has not been 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
Este PR corrige o cálculo do endpoint de dias úteis e melhora a estabilidade do teste E2E de ISBN.
O endpoint
/api/diasuteis/v1misturava datas UTC com operações no fuso horário local. Em ambientes configurados com o fuso brasileiro, isso fazia algumas segundas-feiras serem interpretadas como domingos e removidas indevidamente do resultado. O cálculo agora utiliza UTC de forma consistente para identificar o ano, o dia da semana e avançar entre as datas.O teste de ISBN inexistente também foi ajustado para:
Além disso, o
lint-stagedfoi configurado para executar o ESLint somente nos arquivos adicionados ao commit.🎯 Tipo de Mudança
📚 Checklist de Documentação
/pages/docs/doc/🧪 Checklist de Testes
npm test)💻 Checklist de Código
npm run fixantes de commitar🚀 Checklist de Performance e Custos
🔍 Como Testar
npm run devnpm testnpx vitest run tests/diasuteis-v1.test.js tests/isbn-v1.test.js --coverage.enabled=falseGET /api/diasuteis/v1?dataInicial=2026-08-03&dataFinal=2026-08-07📎 Issues Relacionadas
📝 Notas Adicionais
Pontos de Atenção Críticos:
Lembre-se: BrasilAPI serve milhares de desenvolvedores e empresas importantes. Mudanças devem ser cuidadosamente avaliadas para garantir confiabilidade e zero downtime.