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

214
Views
Why does Jest sometimes prints "pretty" error messages with line pointers, and sometimes not?

I have jest 27 installed, and I see that sometimes I get pretty error messages like this (with visual pointer to the failing line): enter image description here

And sometimes it prints the errors like this (plain error, without pointer): enter image description here

I am trying to understand why it happens, can someone help me with that?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Ok, after doing some investigations, it seems like the difference is if the error happens in node_modules or not. If the error is thrown within the project's root, jest will print a pretty message with a pointer to the line that caused the error. But if the error happens from within the node_modules folder, Jest will print the error message along with the stack trace, without any visual pointers.

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!