From f867e3e2ece67781d23cff532c64fcd8bbc90c73 Mon Sep 17 00:00:00 2001 From: Achord Chan Date: Tue, 22 Sep 2026 18:34:36 +0800 Subject: [PATCH] test(antigravity): check schema properties type assertion --- backend/internal/pkg/antigravity/schema_const_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/internal/pkg/antigravity/schema_const_test.go b/backend/internal/pkg/antigravity/schema_const_test.go index ac83a4026c..05551fbd83 100644 --- a/backend/internal/pkg/antigravity/schema_const_test.go +++ b/backend/internal/pkg/antigravity/schema_const_test.go @@ -35,7 +35,8 @@ func TestBuildToolsPreservesStringConst(t *testing.T) { }}) require.Len(t, tools, 1) require.Len(t, tools[0].FunctionDeclarations, 1) - properties := tools[0].FunctionDeclarations[0].Parameters["properties"].(map[string]any) + properties, ok := tools[0].FunctionDeclarations[0].Parameters["properties"].(map[string]any) + require.True(t, ok, "tool parameters must contain a properties object") got, err := json.Marshal(properties["action"]) require.NoError(t, err) require.JSONEq(t, tc.want, string(got))