Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

highlight test codelines in stacktraces #961

Closed
tarjei opened this issue Aug 26, 2013 · 1 comment
Closed

highlight test codelines in stacktraces #961

tarjei opened this issue Aug 26, 2013 · 1 comment

Comments

@tarjei
Copy link

tarjei commented Aug 26, 2013

I'm not sure if this is hard or easy, but here goes:

It would be great if there was a way to get the standard reporter to highlight the lines in the stacktrace that match a simple regexp.

This would be a great tool to quickly find the offending line when looking through a stacktrace of 40 - 50 lines and looking for the one line where you invoke a function - the rest of the lines are often just noise..

@danielstjules
Copy link
Contributor

I'm gonna close this as I think the end goal was achieved in #1564

For example

$ cat example.js
it('test', function(done) {
  done(new Error('Something went wrong!'));
});

$ mocha example.js

  

  0 passing (5ms)
  1 failing

  1)  test:
     Error: Something went wrong!
      at Context.<anonymous> (example.js:2:8)

Neat, right :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants