You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('foo',function(){it('bar',function(){thrownewError('this is a test in '+process.cwd()+'/foo/bar/test.js and it fails');});});
will output
1) foo bar:
this is a test in /Users/tbn/Code/tmp/mocha-stack-bug/foo/bar/test.js and it fails
Error: this is a test in foo/bar/test.js and it fails
at Context.<anonymous> (test/test.js:5:11)
and as you can see the this is a test in message is duplicated in the output. In this example it is not a big deal but once you have larger error messages this becomes really problematic (see BadgeLabs/mocha-eslint#29).
I've tracked this down to stackTraceFilter() being applied before the BaseReporter.list() method runs which removes the message from the stack property. But since the stack has been beautified the messages will no longer be equal due to the process.cwd() removal.
The text was updated successfully, but these errors were encountered:
Turbo87
added a commit
to Turbo87/mocha-eslint
that referenced
this issue
Feb 25, 2016
will output
and as you can see the
this is a test in
message is duplicated in the output. In this example it is not a big deal but once you have larger error messages this becomes really problematic (see BadgeLabs/mocha-eslint#29).I've tracked this down to
stackTraceFilter()
being applied before theBaseReporter.list()
method runs which removes themessage
from thestack
property. But since thestack
has been beautified themessages
will no longer be equal due to theprocess.cwd()
removal.The text was updated successfully, but these errors were encountered: