chaijs/chai — pull request #88 by pwnall (2012-07-19 09:13:30+00:00)
Title: Don't inspect() assertion arguments if the assertion passes

I stumbled upon this while trying to assert that an XHR instance is indeed an instance of XHR for a JavaScript API that I'm developing. The inspect() implementation in chai.js throws an error on an in-progress XHR.

Details aside, it seems like it's a good idea to avoid inspect()ing the arguments of an assertion if it passes. I hope you'll consider merging this change.

Thank you so, so much for chai.js! I'm really happy to have expect() and assert() available in browser tests by including one single library!