Verify that an exception is thrown using Mocha / Chai and async/await

The problem with this approach is that (await fails()).should.throw(Error) doesn’t make sense. await resolves a Promise. If the Promise rejects, it throws the rejected value. So (await fails()).should.throw(Error) can never work: if fails() rejects, an error is thrown, and .should.throw(Error) is never executed. The most idiomatic option you have is to use Chai’s rejectedWith property, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)