Skip to content

Commit 14fb6a3

Browse files
authored
Merge pull request #31 from objectstack-ai/copilot/fix-ci-build-and-test
2 parents 371831d + b19445c commit 14fb6a3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

__tests__/hooks/useQueryBuilder.test.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
*/
55
import { renderHook, act } from "@testing-library/react-native";
66

7+
/* ---- Types ---- */
8+
interface SerializedFilter {
9+
logic: string;
10+
filters: Array<{
11+
field: string;
12+
operator: string;
13+
value: string;
14+
}>;
15+
}
16+
717
/* ---- Mock query-builder helpers ---- */
818
let mockNextId = 0;
919
jest.mock("~/lib/query-builder", () => ({
@@ -186,7 +196,7 @@ describe("useQueryBuilder", () => {
186196

187197
const serialized = result.current.serialize();
188198
expect(serialized).toBeDefined();
189-
expect(serialized.logic).toBe("AND");
199+
expect((serialized as SerializedFilter).logic).toBe("AND");
190200
});
191201

192202
it("manages selected fields and projection", () => {

0 commit comments

Comments
 (0)