test: adiciona testes com cobertura MC/DC para searchInMercadoEditorial #720
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.



test: adiciona cobertura de testes MC/DC para searchInMercadoEditorial
Resumo
Implementação de testes unitários para o método
searchInMercadoEditorialutilizando o critério MC/DC (Modified Condition/Decision Coverage) para garantir cobertura completa de decisões e condições.Motivação
O método
searchInMercadoEditorialnão possuía testes unitários específicos e contém múltiplas decisões com condições compostas que precisam ser testadas de forma sistemática.Mudanças
Arquivos Adicionados
tests/services/isbn/searchInMercadoEditorial.test.js: 16 casos de teste cobrindo:!response.data.books || !response.data.books[0]meBook.subtitulo && meBook.subtitulo.length > 0meBook.medidas && meBook.medidas.paginasmeBook.imagens && meBook.imagens.imagem_primeira_capa && meBook.imagens.imagem_primeira_capa.grandeArquivos Modificados
vite.config.js: Adicionado alias@para permitir imports com caminho absolutoCobertura de Testes
Como Executar os Testes
npm install ./node_modules/.bin/vitest run tests/services/isbn/searchInMercadoEditorial.test.js --config=vitest.unit.config.js Ou usando o comando de teste padrão: npm test -- tests/services/isbn/searchInMercadoEditorial.test.js