The problem of the following code snippet is if try block does not throw an exception then the catch block will not call,
so the assertion will not run and the test will pass.
try {
await client.issueInvoice(invoice)
} catch (e) {
expect(e.message).to.be.string('Some error message from the remote service')
}
The problem of the following code snippet is if try block does not throw an exception then the catch block will not call, so the assertion will not run and the test will pass.