You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letsuccess=falsetry{Joi.attempt({optionalString: null},Foo.SCHEMA);success=true}catch(e){}assert.ok(success,'optionalString should be possible to be set to null')
In the code above the assert.ok should not fail
Actual Behaviour
It fails with the message "[1] "optionalString" must be a string"
The text was updated successfully, but these errors were encountered:
Setting a string as non-required don't allow to use
null
s as its valueEnviroment
How to reproduce
Expectations
Expected Behaviour
In the code above the
assert.ok
should not failActual Behaviour
It fails with the message
"[1] "optionalString" must be a string"
The text was updated successfully, but these errors were encountered: