test: minor

This commit is contained in:
Ajai Shankar 2023-02-12 19:47:14 -06:00
parent e777eed00d
commit 209f30998e
2 changed files with 3 additions and 2 deletions

View File

@ -39,7 +39,8 @@ describe("get", () => {
["customer.orders.foo", undefined],
["..customer.foo", undefined],
["..address", [{ city: "bangalore" }]], // .. will return array
["..address[0]", { city: "bangalore" }]
["..address[0]", { city: "bangalore" }],
["..items..amount[?][0]", 40, amt => amt > 30]
])("%s should be %j %s", (expr, result, filter = undefined) => {
expect(get(data, expr, filter)).toEqual(result);
});