Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

263
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!