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

Duplication in the error's stack and message #19

Closed
rstacruz opened this issue Apr 26, 2015 · 7 comments
Closed

Duplication in the error's stack and message #19

rstacruz opened this issue Apr 26, 2015 · 7 comments

Comments

@rstacruz
Copy link

In mocha, the power-assert messages are displayed on both the stack and the message... it's a bit redundant.

pasted_image_4_26_15__2_27_pm

@rstacruz
Copy link
Author

@twada
Copy link
Member

twada commented Apr 26, 2015

@rstacruz Thank you for reporting!

In mocha, the power-assert messages are displayed on both the stack and the message... it's a bit redundant.

I think so too. This problem should be fixed ASAP.

Duplication appears since mocha 2.2.3, maybe since this commit.

I'll isolate the problem to determine which is wrong (power-assert or mocha), then fix or PR it soon.

Thanks!

@twada
Copy link
Member

twada commented Apr 26, 2015

Ah this problem is due to this change (Shorten stack traces). Filepath is shortened to relative path to the deploy folder, on the other hand Assertion message created by power-assert is absolute filepath. So first line in stack and assertion message does not match, stack is preserved, duplication appears.

I'll try to store relative paths in power-assert message.

@rstacruz
Copy link
Author

heh, considering that feature came from my work, i guess indirectly I caused that ;)

@rstacruz rstacruz changed the title Question: removing the messages from the stack? Duplication in the error's stack and message Apr 26, 2015
@twada
Copy link
Member

twada commented Aug 26, 2015

This issue is fixed by the 1.0.0 release.
Feel free to reopen this if it is not fixed.

@twada twada closed this as completed Aug 26, 2015
@rstacruz
Copy link
Author

congrats on the 1.0 release!

@twada
Copy link
Member

twada commented Aug 27, 2015

@rstacruz Thanks! :)

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