Skip to content

Commit

Permalink
Add test for existence test without segments
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Mar 23, 2024
1 parent 7bd8532 commit c8e2514
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
18 changes: 18 additions & 0 deletions cts.json
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,24 @@
"selector": "$..",
"invalid_selector": true
},
{
"name": "filter, existence, without segments",
"selector": "$[?@]",
"document": {
"a": 1,
"b": null
},
"results": [
[
1,
null
],
[
null,
1
]
]
},
{
"name": "filter, existence",
"selector": "$[[email protected]]",
Expand Down
9 changes: 9 additions & 0 deletions tests/filter.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
{
"tests": [
{
"name": "existence, without segments",
"selector": "$[?@]",
"document": {"a": 1, "b": null},
"results": [
[1, null],
[null, 1]
]
},
{
"name": "existence",
"selector" : "$[[email protected]]",
Expand Down

0 comments on commit c8e2514

Please sign in to comment.