Skip to content

Commit 2841984

Browse files
committed
added null-handling tests for contains
1 parent 4d1a916 commit 2841984

File tree

4 files changed

+60
-0
lines changed

4 files changed

+60
-0
lines changed

tests/draft2019-09/contains.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,20 @@
146146
"valid": false
147147
}
148148
]
149+
},
150+
{
151+
"description": "contains should properly handle null data",
152+
"schema": {
153+
"contains": {
154+
"type": null
155+
}
156+
},
157+
"tests": [
158+
{
159+
"description": "null properties allowed",
160+
"data": [ null ],
161+
"valid": true
162+
}
163+
]
149164
}
150165
]

tests/draft2020-12/contains.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,20 @@
146146
"valid": false
147147
}
148148
]
149+
},
150+
{
151+
"description": "contains should properly handle null data",
152+
"schema": {
153+
"contains": {
154+
"type": null
155+
}
156+
},
157+
"tests": [
158+
{
159+
"description": "null properties allowed",
160+
"data": [ null ],
161+
"valid": true
162+
}
163+
]
149164
}
150165
]

tests/draft6/contains.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,20 @@
125125
"valid": false
126126
}
127127
]
128+
},
129+
{
130+
"description": "contains should properly handle null data",
131+
"schema": {
132+
"contains": {
133+
"type": null
134+
}
135+
},
136+
"tests": [
137+
{
138+
"description": "null properties allowed",
139+
"data": [ null ],
140+
"valid": true
141+
}
142+
]
128143
}
129144
]

tests/draft7/contains.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,20 @@
146146
"valid": false
147147
}
148148
]
149+
},
150+
{
151+
"description": "contains should properly handle null data",
152+
"schema": {
153+
"contains": {
154+
"type": null
155+
}
156+
},
157+
"tests": [
158+
{
159+
"description": "null properties allowed",
160+
"data": [ null ],
161+
"valid": true
162+
}
163+
]
149164
}
150165
]

0 commit comments

Comments
 (0)