I\'m struggling to work out the best way to verify that a promise is rejected in a Mocha test while using async/await.
Here\'s an example that works, but I dislike t
you can write a function to swap resolve & reject handler, and do anything normally
const promise = new Promise((resolve, rejects) => { YourPromise.then(rejects, resolve); }) const res = await promise; res.should.be.an("error");