Open evansalter opened 1 year ago
Test output (no regressions):
❯ rake test
Run options: --seed 58270
# Running tests:
................................................................................................SS.................
Finished tests in 0.343056s, 335.2222 tests/s, 574.2503 assertions/s.
115 tests, 197 assertions, 0 failures, 0 errors, 2 skips
Coverage report generated for MiniTest to /Users/evansalter/dev/jsonpath/coverage. 352 / 361 LOC (97.51%) covered.
@joshbuddy Could you please review it?
Fixes https://github.com/joshbuddy/jsonpath/issues/151
Added a check for the situation where
!
is the operator, and there is no operand. This allows us to use a JSONPath like$[?(!@['pull_request'])]
or$[?(!@.pull_request)]
where we want to receive the items from an array that don't have apull_request
key.Open to feedback on this. I know it's not an overly generic fix, but this seems like a pretty specific edge case, so I figured a specific check would be warranted.