File tree Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Expand file tree Collapse file tree 2 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 184
184
"valid" : true
185
185
}
186
186
]
187
+ },
188
+ {
189
+ "description" : " if with boolean schema true" ,
190
+ "schema" : {
191
+ "if" : true ,
192
+ "then" : { "const" : " then" },
193
+ "else" : { "const" : " else" }
194
+ },
195
+ "tests" : [
196
+ {
197
+ "description" : " boolean schema true in if always chooses the then path (valid)" ,
198
+ "data" : " then" ,
199
+ "valid" : true
200
+ },
201
+ {
202
+ "description" : " boolean schema true in if always chooses the then path (invalid)" ,
203
+ "data" : " else" ,
204
+ "valid" : false
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ "description" : " if with boolean schema false" ,
210
+ "schema" : {
211
+ "if" : false ,
212
+ "then" : { "const" : " then" },
213
+ "else" : { "const" : " else" }
214
+ },
215
+ "tests" : [
216
+ {
217
+ "description" : " boolean schema false in if always chooses the else path (invalid)" ,
218
+ "data" : " then" ,
219
+ "valid" : false
220
+ },
221
+ {
222
+ "description" : " boolean schema false in if always chooses the else path (valid)" ,
223
+ "data" : " else" ,
224
+ "valid" : true
225
+ }
226
+ ]
187
227
}
188
228
]
Original file line number Diff line number Diff line change 184
184
"valid" : true
185
185
}
186
186
]
187
+ },
188
+ {
189
+ "description" : " if with boolean schema true" ,
190
+ "schema" : {
191
+ "if" : true ,
192
+ "then" : { "const" : " then" },
193
+ "else" : { "const" : " else" }
194
+ },
195
+ "tests" : [
196
+ {
197
+ "description" : " boolean schema true in if always chooses the then path (valid)" ,
198
+ "data" : " then" ,
199
+ "valid" : true
200
+ },
201
+ {
202
+ "description" : " boolean schema true in if always chooses the then path (invalid)" ,
203
+ "data" : " else" ,
204
+ "valid" : false
205
+ }
206
+ ]
207
+ },
208
+ {
209
+ "description" : " if with boolean schema false" ,
210
+ "schema" : {
211
+ "if" : false ,
212
+ "then" : { "const" : " then" },
213
+ "else" : { "const" : " else" }
214
+ },
215
+ "tests" : [
216
+ {
217
+ "description" : " boolean schema false in if always chooses the else path (invalid)" ,
218
+ "data" : " then" ,
219
+ "valid" : false
220
+ },
221
+ {
222
+ "description" : " boolean schema false in if always chooses the else path (valid)" ,
223
+ "data" : " else" ,
224
+ "valid" : true
225
+ }
226
+ ]
187
227
}
188
228
]
You can’t perform that action at this time.
0 commit comments