Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

281
Visualizações
Stencil unit test reporting (with Jest) broken

I am currently struggling to unit test my Stencil code, due to its reporting being broken. I found some similar questions, but they all mention the problem that there is no percentage being shown. Mine is different, where the reporter (also in the HTML) is showing me completely wrong line where e.g. my conditional expression is not fully tested or line is not being covered by test. On top of that, the code highlighting itself is also completely off course.

The HTML reporter looks like the following:

(|| means it's red highlighted, not covered by test, and (i) means e.g. if-block is partially covered)

export class Test {
||  @Prop() input: boolean;
||  const aConst = 'abc';
    let counter = 0;
||
    t(i)estMe(a: number, b: number} {
      if (a > b) {
        ... //code
      } else {
||      ... //code
||    }
    } 
}

I am not sure how this could have happened, I suppose it is due to the version mismatch of Stencil and Jest but I can find no official description whatsoever regarding version compatibilities between them both. Does someone have any idea on what might cause it?

Thanks!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This is a known issue in Stencil v2.11.0, and has been fixed but not released yet. The fix will be included in the v2.12.0 release, which will occur on 2021.12.13. Once v2.12.0 is out, please try upgrading and let us know if that works (or not).

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda