-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix filter query existence tests in logical expressions.
- Loading branch information
Showing
2 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { query } from "../../src/path"; | ||
|
||
describe("JSONPath query", () => { | ||
test("logical expression, existence tests", () => { | ||
Check failure on line 4 in tests/path/query.test.ts GitHub Actions / lint
|
||
const path = "$[[email protected] && @.b]"; | ||
Check failure on line 5 in tests/path/query.test.ts GitHub Actions / lint
|
||
const data = [{"a": false, "b": false}]; | ||
Check failure on line 6 in tests/path/query.test.ts GitHub Actions / lint
|
||
expect(query(path, data).values()).toStrictEqual([{"a": false, "b": false}]); | ||
Check failure on line 7 in tests/path/query.test.ts GitHub Actions / lint
|
||
}); | ||
Check failure on line 8 in tests/path/query.test.ts GitHub Actions / lint
|
||
} | ||
Check failure on line 9 in tests/path/query.test.ts GitHub Actions / lint
|
||
); |