diff --git a/src/gateway/server-methods/skills.update.normalizes-api-key.test.ts b/src/gateway/server-methods/skills.update.normalizes-api-key.test.ts index 427d653510a5..2ce1c1f12133 100644 --- a/src/gateway/server-methods/skills.update.normalizes-api-key.test.ts +++ b/src/gateway/server-methods/skills.update.normalizes-api-key.test.ts @@ -30,8 +30,8 @@ function expectWrittenSkillEntry(skillKey: string, entry: unknown) { entries?: Record; }; }; - expect(Object.keys(config).sort()).toEqual(["skills"]); - expect(Object.keys(config.skills ?? {}).sort()).toEqual(["entries"]); + expect(Object.keys(config).toSorted()).toEqual(["skills"]); + expect(Object.keys(config.skills ?? {}).toSorted()).toEqual(["entries"]); expect(config.skills?.entries?.[skillKey]).toEqual(entry); } diff --git a/src/gateway/server-methods/tools-catalog.test.ts b/src/gateway/server-methods/tools-catalog.test.ts index 2b34ae265ee4..eaa7e60529d2 100644 --- a/src/gateway/server-methods/tools-catalog.test.ts +++ b/src/gateway/server-methods/tools-catalog.test.ts @@ -124,11 +124,9 @@ describe("tools.catalog handler", () => { const voiceCall = pluginGroups .flatMap((group) => group.tools) .find((tool) => tool.id === "voice_call"); - expect(voiceCall).toMatchObject({ - source: "plugin", - pluginId: "voice-call", - optional: true, - }); + expect(voiceCall?.source).toBe("plugin"); + expect(voiceCall?.pluginId).toBe("voice-call"); + expect(voiceCall?.optional).toBe(true); }); it("summarizes plugin tool descriptions the same way as the effective inventory", async () => { @@ -159,15 +157,12 @@ describe("tools.catalog handler", () => { await invoke(); - expect(vi.mocked(resolvePluginTools)).toHaveBeenCalledWith( - expect.objectContaining({ - allowGatewaySubagentBinding: true, - }), - ); - expect(vi.mocked(ensureStandalonePluginToolRegistryLoaded)).toHaveBeenCalledWith( - expect.objectContaining({ - allowGatewaySubagentBinding: true, - }), + expect(vi.mocked(resolvePluginTools).mock.calls[0]?.[0]?.allowGatewaySubagentBinding).toBe( + true, ); + expect( + vi.mocked(ensureStandalonePluginToolRegistryLoaded).mock.calls[0]?.[0] + ?.allowGatewaySubagentBinding, + ).toBe(true); }); });