Use chai `assert.throw` instead of creating new errors.