Skip to content

Commit d664720

Browse files
authored
Merge pull request #642 from koic/read_the_wire_meta_member_back_through_json_in_the_skills_test
Read the wire `_meta` member back through JSON in the Skills server test
2 parents d518025 + 838a380 commit d664720

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎test/mcp/server_skills_test.rb‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ def initialize_capabilities(server)
102102
got = server.handle(request("skills/get", { uri: "skill://git/SKILL.md" }))[:result]
103103
assert_equal annotated.to_h, got[:skill]
104104
assert_equal({ "com.example/origin" => "catalog" }, got[:skill][:_meta])
105-
assert_equal '"_meta":{"com.example/origin":"catalog"}', JSON.generate(got[:skill])[/"_meta":\{[^}]*\}/]
105+
# Read back through JSON, so the key the wire carries is checked, not the Symbol the Hash holds.
106+
assert_equal({ "com.example/origin" => "catalog" }, JSON.parse(JSON.generate(got[:skill]))["_meta"])
106107
end
107108
end
108109

0 commit comments

Comments
 (0)