Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDiff not working when comparison is in a callback #55
Comments
|
I am not sure if this is a problem with the reporter itself. I played around with some simple bluebird promises and it works. I also found a stack overflow thread with suggest 2 points. First to return the promise itself instead of calling done within the promise. And second also return the result of the assertion. Reference (http://stackoverflow.com/questions/30405551/how-to-register-a-failed-mocha-test-on-a-promise) So your example becomes this:
But I was not able to run you example because I need more informations to see it up. So if you still have the error it would be nice if you could give me a full working example. That would really help me to reproduce the problem. |
Any chance this could be fixed? When doing a object comparison inside of a callback, instead of displaying a nice diff, all you get is:
WARN: 'Unhandled rejection AssertionError: expected [ Array(1) ] to deeply equal [ Array(1) ]'Example code:
I'm using chaijs for assertions, backbone+marionette, and bluebirdjs for promises.