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

Add error reason for test failing in growl notifications #530

Closed
renegaed opened this issue Jul 31, 2012 · 8 comments
Closed

Add error reason for test failing in growl notifications #530

renegaed opened this issue Jul 31, 2012 · 8 comments
Labels
type: feature enhancement proposal

Comments

@renegaed
Copy link

Hi I use mocha extensively throughout my node application and have it watching my directory to ensure that code is working as expected. It would be great if my growl notifications could display the reason for a failed test as well. If this is not a priority could u refer me to where I can perhaps learn how to implement this myself? Thanks.

@tj
Copy link
Contributor

tj commented Jul 31, 2012

the messages can get pretty massive though that's the problem

@renegaed
Copy link
Author

renegaed commented Aug 1, 2012

Hi, I would ideally like just the error, not the full stack trace. Any suggestions?

@tj
Copy link
Contributor

tj commented Aug 1, 2012

what we could do is truncate the msg if it's too long, for example object comparisons might be really large, I'd be fine with that, we can just trail with …

@renegaed
Copy link
Author

renegaed commented Aug 1, 2012

Yer that sounds fair. If you look at this error:

  1. Pie create enforce proper Id naming convention:
    AssertionError: expected an exception to be thrown with a message matching 'Id does not follow naming conventionss', but got 'Id does not follow naming conventions'
    at Object. (/Users/vijay/Sites/node/peepcode/node_modules/should/lib/should.js:692:10)
    at Context. (/Users/vijay/Sites/node/peepcode/test/app/models/pie-test.coffee:28:26)
    at Test.run (/Users/vijay/Sites/node/peepcode/node_modules/mocha/lib/runnable.js:184:32)
    at Runner.runTest (/Users/vijay/Sites/node/peepcode/node_modules/mocha/lib/runner.js:300:10)
    at /Users/vijay/Sites/node/peepcode/node_modules/mocha/lib/runner.js:346:12
    at next (/Users/vijay/Sites/node/peepcode/node_modules/mocha/lib/runner.js:228:14)
    at /Users/vijay/Sites/node/peepcode/node_modules/mocha/lib/runner.js:237:7
    at next (/Users/vijay/Site

the relevant part that would allow me to jump to that file immediately without looking at the console would be:

  1. Pie create enforce proper Id naming convention:
    AssertionError: expected an exception to be thrown with a message matching 'Id does not follow naming conventionss', but got 'Id does not follow naming conventions'

You could perhaps truncate the above?

@andreineculau
Copy link

+1
I've just set up Mocha with Growl, and it is 99% when working on a small screen.
Editor takes up 100% of the screen, save - boom. Growl says Yay or Nay.
In many cases it's enough with an indication of the reason+line to figure out the error, without having to switch to the test-window.

@Freyert
Copy link

Freyert commented May 8, 2015

A Growl reporter could be pretty sweet. Or some kind of hook.

@boneskull
Copy link
Member

I think it already does Growl but I'd argue it should be removed from core and available as a plugin. Hoping to have some solid time to work on the plugin API in the coming weeks. But, yes, a truncated failure report would be nice.

@boneskull boneskull added type: feature enhancement proposal future needs to wait labels May 9, 2015
@boneskull boneskull added status: accepting prs Mocha can use your help with this one! and removed future needs to wait labels Oct 17, 2017
@juergba juergba removed the status: accepting prs Mocha can use your help with this one! label Jul 2, 2021
@juergba
Copy link
Member

juergba commented Jul 2, 2021

Issue has been inactive for years, closing.

@juergba juergba closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature enhancement proposal
Projects
None yet
Development

No branches or pull requests

6 participants