chaijs / chai-as-promised

Extends Chai with assertions about promises.
MIT License
1.42k stars 109 forks source link

Printing stacktrace whenever a promise is rejected #268

Open kobik opened 3 years ago

kobik commented 3 years ago

I'd like to make it easier to troubleshoot whenever is test is failing because a promise was either rejected instead fulfilled or rejectedWith a different error.

Currently I get errors like that from chai which makes me start a debugger instead of immediately letting me know where the error thrown from

AssertionError: expected promise to be fulfilled but it was rejected with 'RequestError: Cannot read property \'request\' of undefined'

Would appreciate any advice on that.

Thanks!

nopeless commented 1 year ago

276