Skip to content

Commit 6315a51

Browse files
committed
added null-handling tests for single-form items
1 parent 278e5b3 commit 6315a51

File tree

7 files changed

+105
-0
lines changed

7 files changed

+105
-0
lines changed

tests/draft-next/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,5 +252,20 @@
252252
"valid": false
253253
}
254254
]
255+
},
256+
{
257+
"description": "items should properly handle null data",
258+
"schema": {
259+
"items": {
260+
"type": null
261+
}
262+
},
263+
"tests": [
264+
{
265+
"description": "null properties allowed",
266+
"data": [ null ],
267+
"valid": true
268+
}
269+
]
255270
}
256271
]

tests/draft2019-09/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,20 @@
246246
"valid": false
247247
}
248248
]
249+
},
250+
{
251+
"description": "items should properly handle null data",
252+
"schema": {
253+
"items": {
254+
"type": null
255+
}
256+
},
257+
"tests": [
258+
{
259+
"description": "null properties allowed",
260+
"data": [ null ],
261+
"valid": true
262+
}
263+
]
249264
}
250265
]

tests/draft2020-12/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,5 +252,20 @@
252252
"valid": false
253253
}
254254
]
255+
},
256+
{
257+
"description": "items should properly handle null data",
258+
"schema": {
259+
"items": {
260+
"type": null
261+
}
262+
},
263+
"tests": [
264+
{
265+
"description": "null properties allowed",
266+
"data": [ null ],
267+
"valid": true
268+
}
269+
]
255270
}
256271
]

tests/draft3/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,20 @@
4242
"valid": false
4343
}
4444
]
45+
},
46+
{
47+
"description": "items should properly handle null data",
48+
"schema": {
49+
"items": {
50+
"type": null
51+
}
52+
},
53+
"tests": [
54+
{
55+
"description": "null properties allowed",
56+
"data": [ null ],
57+
"valid": true
58+
}
59+
]
4560
}
4661
]

tests/draft4/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,5 +191,20 @@
191191
"valid": false
192192
}
193193
]
194+
},
195+
{
196+
"description": "items should properly handle null data",
197+
"schema": {
198+
"items": {
199+
"type": null
200+
}
201+
},
202+
"tests": [
203+
{
204+
"description": "null properties allowed",
205+
"data": [ null ],
206+
"valid": true
207+
}
208+
]
194209
}
195210
]

tests/draft6/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,20 @@
246246
"valid": false
247247
}
248248
]
249+
},
250+
{
251+
"description": "items should properly handle null data",
252+
"schema": {
253+
"items": {
254+
"type": null
255+
}
256+
},
257+
"tests": [
258+
{
259+
"description": "null properties allowed",
260+
"data": [ null ],
261+
"valid": true
262+
}
263+
]
249264
}
250265
]

tests/draft7/items.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,20 @@
246246
"valid": false
247247
}
248248
]
249+
},
250+
{
251+
"description": "items should properly handle null data",
252+
"schema": {
253+
"items": {
254+
"type": null
255+
}
256+
},
257+
"tests": [
258+
{
259+
"description": "null properties allowed",
260+
"data": [ null ],
261+
"valid": true
262+
}
263+
]
249264
}
250265
]

0 commit comments

Comments
 (0)