Skip to content

Commit 92bfeda

Browse files
committed
test: skipped test for error reporting with coerceTypes option, #469
1 parent 3dd4ff2 commit 92bfeda

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

spec/coercion.spec.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,25 @@ describe('Type coercion', function () {
397397
});
398398

399399

400+
it.skip('should generate one error for type with coerceTypes option (issue #469)', function() {
401+
var schema = {
402+
"type": "number",
403+
"minimum": 10
404+
};
405+
406+
instances.forEach(function (ajv) {
407+
var validate = ajv.compile(schema);
408+
validate(9). should.equal(false);
409+
validate.errors.length .should.equal(1);
410+
411+
validate(11). should.equal(true);
412+
413+
validate('foo'). should.equal(false);
414+
validate.errors.length .should.equal(1);
415+
});
416+
});
417+
418+
400419
function testRules(rules, cb) {
401420
for (var toType in rules) {
402421
for (var fromType in rules[toType]) {

0 commit comments

Comments
 (0)