-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
String diffs not shown anymore when using node assert.equal #1614
Comments
Can't say exactly when it stopped working, but I took this screenshot once: https://www.npmjs.com/package/consolify |
Thanks for the pointer @a8m, I removed the |
kk, I'm on it. update: v1.21.5 |
Thanks for pointing that out @mantoni. |
Is this something that we want to fix @mochajs/mocha ? if so, I'll label it as a "bug", and start to working on it. |
So it depends on whether the asserting library sets |
It's a feature that is advertised on the mocha page, but it only works in specific setups. So if this is not going to considered a bug, it could be a new flag to opt in and it would be nice to pit some notes on how to get it working on the web page. |
Yes, but it's worked before ( |
Could you please answer my doubts/questions? Regarding if it's a regression or not, we are making people waste time trying to figure out why the diff is no longer showing, and how to make it show it again. That's something I would only do in a major version. We need to get this fixed this asap. |
Yes.
If you're using try {
assert.equal("foo", "bar")
} catch(e) {
e.showDiff = true
throw e
} |
Thanks very much, @a8m. Ugh, this is ugly. Maybe we could add a flag for ignoring This is not a common case, right? I wouldn't make it the default behavior to ignore |
Flag is not a good solution for some reasons(e.g: you can't use it dynamically or for a specific assertions). I think it should |
But then the user wouldn't have a choice, it would be up to the assertion module/library, right? |
I like what @a8m proposed because it makes Mocha work as advertised without breaking other libraries that depend on the |
Me neither. |
Goes. 🚢 |
fix(reporter/base): explicitly ignore showDiff #1614
Thanks guys @mantoni @dasilvacontin |
For other goofer like me, remember that |
I created a gist that reproduces the issue for me on OS X with node 0.10.32:
https://gist.github.com/mantoni/e2927ced1484f01b1fb8
Thanks for looking into it!
The text was updated successfully, but these errors were encountered: