We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 371831d + b19445c commit 14fb6a3Copy full SHA for 14fb6a3
__tests__/hooks/useQueryBuilder.test.ts
@@ -4,6 +4,16 @@
4
*/
5
import { renderHook, act } from "@testing-library/react-native";
6
7
+/* ---- Types ---- */
8
+interface SerializedFilter {
9
+ logic: string;
10
+ filters: Array<{
11
+ field: string;
12
+ operator: string;
13
+ value: string;
14
+ }>;
15
+}
16
+
17
/* ---- Mock query-builder helpers ---- */
18
let mockNextId = 0;
19
jest.mock("~/lib/query-builder", () => ({
@@ -186,7 +196,7 @@ describe("useQueryBuilder", () => {
186
196
187
197
const serialized = result.current.serialize();
188
198
expect(serialized).toBeDefined();
189
- expect(serialized.logic).toBe("AND");
199
+ expect((serialized as SerializedFilter).logic).toBe("AND");
190
200
});
191
201
192
202
it("manages selected fields and projection", () => {
0 commit comments