Skip to content

Commit

Permalink
test: skipped test for error reporting with coerceTypes option, #469
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Apr 28, 2017
1 parent 3dd4ff2 commit 92bfeda
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/coercion.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,25 @@ describe('Type coercion', function () {
});


it.skip('should generate one error for type with coerceTypes option (issue #469)', function() {
var schema = {
"type": "number",
"minimum": 10
};

instances.forEach(function (ajv) {
var validate = ajv.compile(schema);
validate(9). should.equal(false);
validate.errors.length .should.equal(1);

validate(11). should.equal(true);

validate('foo'). should.equal(false);
validate.errors.length .should.equal(1);
});
});


function testRules(rules, cb) {
for (var toType in rules) {
for (var fromType in rules[toType]) {
Expand Down

0 comments on commit 92bfeda

Please sign in to comment.