Add tests that show that with nullable option on but 'nullable' keyword set to false an object is not nullable.

master
Mathew Polzin 2019-02-07 08:39:32 -08:00
parent 28c85ada05
commit 859259eeca
1 changed files with 12 additions and 0 deletions

View File

@ -1519,6 +1519,18 @@ describe('Ajv Options', function () {
testNotNullable({type: ['number']});
});
it('should respect "nullable" == false with opts.nullable == true', function() {
testNotNullable({
type: 'number',
nullable: false
});
testNotNullable({
type: ['number'],
nullable: false
});
});
});
describe('without option "nullable"', function() {