Skip to content

Commit

Permalink
Cover existence tests in logical expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jg-rp committed Mar 12, 2024
1 parent 1d03dc6 commit af48f89
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/filter.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,23 @@
{"a":"c", "d": "f"}
]
},
{
"name": "exists and exists, data false",
"selector" : "$[[email protected]&&@.b]",
"document" : [{"a": false, "b": false}, {"b": false}, {"c": false}],
"result": [
{"a": false, "b": false}
]
},
{
"name": "exists or exists, data false",
"selector" : "$[[email protected]||@.b]",
"document" : [{"a": false, "b": false}, {"b": false}, {"c": false}],
"result": [
{"a": false, "b": false},
{"b": false}
]
},
{
"name": "and",
"selector" : "$[[email protected]>0&&@.a<10]",
Expand Down

0 comments on commit af48f89

Please sign in to comment.