mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-31 08:25:35 +00:00
test(antigravity): check schema properties type assertion
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user