Skip to content

Commit 6e47a99

Browse files
committed
added null-handling tests for prefixItems; fixed indentation on previous commit
1 parent 761d4b2 commit 6e47a99

File tree

7 files changed

+39
-5
lines changed

7 files changed

+39
-5
lines changed

tests/draft-next/prefixItems.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,22 @@
7777
"valid": true
7878
}
7979
]
80+
},
81+
{
82+
"description": "prefixItems should properly handle null data",
83+
"schema": {
84+
"items": [
85+
{
86+
"type": null
87+
}
88+
]
89+
},
90+
"tests": [
91+
{
92+
"description": "null properties allowed",
93+
"data": [ null ],
94+
"valid": true
95+
}
96+
]
8097
}
8198
]

tests/draft2019-09/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
"schema": {
268268
"items": [
269269
{
270-
"type": null
270+
"type": null
271271
}
272272
]
273273
},

tests/draft2020-12/prefixItems.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,22 @@
7777
"valid": true
7878
}
7979
]
80+
},
81+
{
82+
"description": "prefixItems should properly handle null data",
83+
"schema": {
84+
"items": [
85+
{
86+
"type": null
87+
}
88+
]
89+
},
90+
"tests": [
91+
{
92+
"description": "null properties allowed",
93+
"data": [ null ],
94+
"valid": true
95+
}
96+
]
8097
}
8198
]

tests/draft3/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"schema": {
6464
"items": [
6565
{
66-
"type": null
66+
"type": null
6767
}
6868
]
6969
},

tests/draft4/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
"schema": {
213213
"items": [
214214
{
215-
"type": null
215+
"type": null
216216
}
217217
]
218218
},

tests/draft6/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
"schema": {
268268
"items": [
269269
{
270-
"type": null
270+
"type": null
271271
}
272272
]
273273
},

tests/draft7/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
"schema": {
268268
"items": [
269269
{
270-
"type": null
270+
"type": null
271271
}
272272
]
273273
},

0 commit comments

Comments
 (0)