Skip to content

Commit 257f522

Browse files
committed
added null-handling tests for unevaluatedItems
1 parent e3c007d commit 257f522

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

tests/draft2019-09/unevaluatedItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,5 +515,20 @@
515515
"valid": true
516516
}
517517
]
518+
},
519+
{
520+
"description": "unevaluatedItems should properly handle null data",
521+
"schema": {
522+
"unevaluatedItems": {
523+
"type": null
524+
}
525+
},
526+
"tests": [
527+
{
528+
"description": "null properties allowed",
529+
"data": [ null ],
530+
"valid": true
531+
}
532+
]
518533
}
519534
]

tests/draft2020-12/unevaluatedItems.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,5 +625,20 @@
625625
"valid": true
626626
}
627627
]
628+
},
629+
{
630+
"description": "unevaluatedItems should properly handle null data",
631+
"schema": {
632+
"unevaluatedItems": {
633+
"type": null
634+
}
635+
},
636+
"tests": [
637+
{
638+
"description": "null properties allowed",
639+
"data": [ null ],
640+
"valid": true
641+
}
642+
]
628643
}
629644
]

tests/draft2020-12/unevaluatedProperties.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,5 +1343,20 @@
13431343
"valid": true
13441344
}
13451345
]
1346+
},
1347+
{
1348+
"description": "unevaluatedProperties should properly handle null data",
1349+
"schema": {
1350+
"unevaluatedProperties": {
1351+
"type": null
1352+
}
1353+
},
1354+
"tests": [
1355+
{
1356+
"description": "null properties allowed",
1357+
"data": {"foo": null},
1358+
"valid": true
1359+
}
1360+
]
13461361
}
13471362
]

0 commit comments

Comments
 (0)