Skip to content

Commit 6638409

Browse files
committed
Added tests for items when data contains more or less types than the
schema What happens if you specify items as an array of types, but you don't include a value for every type? Right now we have no tests for that. We also don't have a test for when there are more values than defined item types.
1 parent 5fb3d9f commit 6638409

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/draft4/items.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,17 @@
4040
"description": "wrong types",
4141
"data": [ "foo", 1 ],
4242
"valid": false
43-
}
43+
},
44+
{
45+
"description": "incomplete array of items",
46+
"data": [ 1 ],
47+
"valid": true
48+
},
49+
{
50+
"description": "array with additional items",
51+
"data": [ 1, "foo", true ],
52+
"valid": true
53+
},
4454
]
4555
}
4656
]

0 commit comments

Comments
 (0)