Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

266
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda