visionmedia/mocha — pull request #711 by millermedeiros (2013-01-10 15:07:12+00:00)
Title: improve `error.showDiff` behavior for multiline strings

previously `error.showDiff` was conflicting with strings, so diff wasn't escaping invisible chars and also wasn't displaying line numbers.

now we make sure `JSON.stringify()` is only called if `error.actual` and/or `error.expected` aren't strings.

Before:

![before](https://f.cloud.github.com/assets/155633/56983/3a992bc6-5b37-11e2-910e-b49922def0a9.png)

After:

![after](https://f.cloud.github.com/assets/155633/56985/4697fce0-5b37-11e2-9811-56d2dfc79697.png)