Mocha / Chai expect.to.throw not catching thrown errors Mocha / Chai expect.to.throw not catching thrown errors javascript javascript