-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvementsupportQuestions, discussions, and general supportQuestions, discussions, and general support
Milestone
Description
As far as I can tell (primarily from reading docs), there's no obvious capability for checking instanceof on a Joi ValidationError.
This makes writing assertions with Code difficult, e.g. I'd like to able to do something like:
const Joi = require('joi')
const expect = require('code').expect
function throws() {
Joi.assert('x', Joi.number())
}
expect(throws).to.throw(Joi.ValidationError)Am I missing something? If not, thoughts on adding this capability?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvementsupportQuestions, discussions, and general supportQuestions, discussions, and general support