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

265
Visualizações
React-scripts test: no traceback on exception

I remake browser version of TacticToy game with React, and during unit-tests writing I've got a problem: there is no full traceback of a custom exception, only test function is highlighted:

TacticToy tests: missing error traceback

In the package.json file's scripts section I have "test": "react-scripts test", it runs Jest under the hood. I tried to run Jest without React-scripts, but this leads to lots of errors, seems like React adds some important config... So, what and how should I adjust to receive tracebacks of exceptions thrown during the tests?

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

0

Thanks to the ESLint, I found the problem source: the code threw exceptions as plain strings, and when I replace it with throw new Error("text") I receive the stack trace :)

The solution is pretty simple (and it doesn't relate to React nor Jest), strange that I've googled no explanation... Here is a moral: always use a linter!

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