Repository navigation
feat: API de dados eleitorais (rebase #749) - #874
Merged
Merged
Conversation
O PR mudava isolate para true globalmente, o que arrisca quebrar o E2E compartilhado (servidor via setup). Mantido o comportamento da main. Co-authored-by: Hermes Agent <[email protected]> Ai-tool: hermes Ai-model: deepseek-v4-flash Ai-os: wsl
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Com isolate:false, o vi.mock('axios') do teste -api vaza para o
teste do serviço — o axios.get vira vi.fn() sem retorno e o
serviço quebra com 'Cannot read properties of undefined'.
Co-authored-by: Hermes Agent <[email protected]>
Ai-tool: hermes
Ai-model: deepseek-v4-flash
Ai-os: wsl
Sem isolate, o vi.mock('axios') (módulo CJS) duplica entre
arquivos no vitest v3: o serviço cacheado mantém a referência
antiga do mock e os mockResolvedValueOnce do teste não são
vistos → 500 em todos os handlers de eleições.
Co-authored-by: Hermes Agent <[email protected]>
Ai-tool: hermes
Ai-model: deepseek-v4-flash
Ai-os: wsl
O const requestUrl no top-level era avaliado antes do beforeAll do setup — com isolate:true (worker por arquivo) o SERVER_URL ainda é undefined → Invalid URL. Convertido para função lazy. Co-authored-by: Hermes Agent <[email protected]> Ai-tool: hermes Ai-model: deepseek-v4-flash Ai-os: wsl
Co-authored-by: Hermes Agent <[email protected]> Ai-tool: hermes Ai-model: deepseek-v4-flash Ai-os: wsl
Co-authored-by: Hermes Agent <[email protected]> Ai-tool: hermes Ai-model: deepseek-v4-flash Ai-os: wsl
|
lucianopf
added a commit
that referenced
this pull request
Aug 10, 2026
* fix: corrige erros de lint introduzidos pelos rebases (#861 #865 #873 #874) - eleicoes/candidaturas: consistent-return — re-throw do erro não-404 (antes o erro era engolido e a função retornava undefined) - holidays: prefer-template - ibge/gov: import sem extensão, === e radix no parseInt - universities: função movida antes do uso (no-use-before-define) e full_name destructured como fullName (camelcase) Esses erros quebram o lint do build (deploys falhando na Vercel). Co-authored-by: Hermes Agent <[email protected]> Ai-tool: hermes Ai-model: deepseek-v4-flash Ai-os: wsl * fix: align prettier endOfLine with editorconfig (lf) and fix lint in rebased pages - .prettierrc: endOfLine crlf -> lf (matches .editorconfig; crlf entered main via #863 rebase and broke EVERY deploy since 08-09 with 'Insert ␍' on every line) - pages/api/diasuteis: convert CRLF blob to LF - pages/api/ibge/cnae/v1/classes: single quotes - pages/api/universities/v1/*: prettier formatting (from #861 rebase) - services/universities.js: prettier formatting --------- Co-authored-by: Hermes Agent <[email protected]>
Closed
This branch had an error being 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.



Rebase do PR original (#749, fork Nibaacriba) na main atual.
Endpoints: anos eleitorais, eleições ordinárias, cargos por município e candidaturas — alimentados pela API pública de divulgação do TSE (divulgacandcontas).
Ajustes no rebase:
vite.config.jsmantido da main (isolate:false— a mudança global paraisolate:truedo PR arriscava quebrar o E2E compartilhado)4 commits cherry-picked do fork.