Skip to content

Commit

Permalink
Add test for nested selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian de Bhal committed Dec 18, 2017
1 parent 3bebc8d commit 8ace642
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/schema-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,23 @@ tape('schemaPath', function(t) {

t.end()
})

tape('schemaPath - nested selectors', function(t) {
var schema = {
anyOf: [
{ oneOf:[
{ allOf: [
{
properties: {
nestedSelectors: {type: "integer"}
}
}
]}
]}
]
}
var validate = validator(schema, { verbose: true, greedy: true } );
t.notOk(validate({nestedSelectors: "nope"}), 'should not crash on visit inside *Of');

t.end()
})

0 comments on commit 8ace642

Please sign in to comment.