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

Stackfilter fix: Don't remove modules/components from stack trace in the browser #1880

Merged
merged 1 commit into from
Sep 13, 2015
Merged

Stackfilter fix: Don't remove modules/components from stack trace in the browser #1880

merged 1 commit into from
Sep 13, 2015

Conversation

danielstjules
Copy link
Contributor

Followup to #1766 and #1767

Makes the behavior consistent in the browser. We now only filter out mocha's own function calls, and don't touch calls from dependencies. Given how modularity is embraced in the node community, I think this is ideal.

@danielstjules danielstjules changed the title Stackfilter fix: Don't remove 3rd modules/components from stack trace in the browser Stackfilter fix: Don't remove modules/components from stack trace in the browser Sep 9, 2015
@aaronjensen
Copy link

This is a good default, though it'd be nice if there was an option that came w/ this. I can imagine chai, other matchers, react, etc all muddying up stack traces.

@danielstjules
Copy link
Contributor Author

Agreed - assertion libraries will get noisy as well. :) But this just makes things consistent across node/browser envs.

As for configuration, that's where things like https://www.github.com/rstacruz/mocha-clean can come in handy. It doesn't need be in mocha's core. Though I personally wouldn't be opposed to it.

@aaronjensen
Copy link

Oh, didn't know there was a mocha-clean. I'm good w/ it being external, though maybe a link in the readme/docs if it's not there already

@ArtemGovorov
Copy link
Contributor

Didn't know about mocha-clean either, thanks for the hint. + 1 to @aaronjensen - a link in readme would be very nice to have.

@danielstjules
Copy link
Contributor Author

I guess it could be added to the wiki :) https://github.com/mochajs/mocha/wiki

@danielstjules
Copy link
Contributor Author

+1? @boneskull

@dasilvacontin
Copy link
Contributor

Sweet, thanks @danielstjules!

dasilvacontin added a commit that referenced this pull request Sep 13, 2015
Stackfilter fix: Don't remove modules/components from stack trace in the browser
@dasilvacontin dasilvacontin merged commit 44ba417 into mochajs:master Sep 13, 2015
@danielstjules danielstjules deleted the stackfilter-browser branch September 13, 2015 20:15
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

Successfully merging this pull request may close these issues.

None yet

4 participants