Skip to content

Commit 528fb62

Browse files
authored
Merge pull request #550 from EpicWink/unevaluated-on-invalid
Add tests for 'unevaluatedX' on invalid types
2 parents db3fdd3 + b1fb455 commit 528fb62

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

tests/draft2020-12/unevaluatedItems.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,5 +593,33 @@
593593
"valid": false
594594
}
595595
]
596+
},
597+
{
598+
"description": "unevaluatedItems on non-applicable type",
599+
"schema": {
600+
"unevaluatedItems": false
601+
},
602+
"tests": [
603+
{
604+
"description": "null is not applicable",
605+
"data": null,
606+
"valid": true
607+
},
608+
{
609+
"description": "number is not applicable",
610+
"data": 42,
611+
"valid": true
612+
},
613+
{
614+
"description": "string is not applicable",
615+
"data": "foo",
616+
"valid": true
617+
},
618+
{
619+
"description": "object is not applicable",
620+
"data": {},
621+
"valid": true
622+
}
623+
]
596624
}
597625
]

tests/draft2020-12/unevaluatedProperties.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,5 +1307,33 @@
13071307
"valid": false
13081308
}
13091309
]
1310+
},
1311+
{
1312+
"description": "unevaluatedProperties on non-applicable type",
1313+
"schema": {
1314+
"unevaluatedProperties": false
1315+
},
1316+
"tests": [
1317+
{
1318+
"description": "null is not applicable",
1319+
"data": null,
1320+
"valid": true
1321+
},
1322+
{
1323+
"description": "number is not applicable",
1324+
"data": 42,
1325+
"valid": true
1326+
},
1327+
{
1328+
"description": "string is not applicable",
1329+
"data": "foo",
1330+
"valid": true
1331+
},
1332+
{
1333+
"description": "array is not applicable",
1334+
"data": [],
1335+
"valid": true
1336+
}
1337+
]
13101338
}
13111339
]

0 commit comments

Comments
 (0)