






















@@ -480,18 +480,14 @@ describe("commands registry", () => {
480480pinActivePluginChannelRegistry(pinnedEmptyRegistry);
481481482482setActivePluginRegistry(createNativeCommandsRegistry("discord"));
483-expect([...commandKeySet(listChatCommands())]).toEqual(
484-expect.arrayContaining(["dock:discord"]),
485-);
486-expect([...commandKeySet(listChatCommands())]).not.toEqual(
487-expect.arrayContaining(["dock:slack"]),
488-);
483+const discordCommandKeys = commandKeySet(listChatCommands());
484+expect(discordCommandKeys.has("dock:discord")).toBe(true);
485+expect(discordCommandKeys.has("dock:slack")).toBe(false);
489486490487setActivePluginRegistry(createNativeCommandsRegistry("slack"));
491-expect([...commandKeySet(listChatCommands())]).not.toEqual(
492-expect.arrayContaining(["dock:discord"]),
493-);
494-expect([...commandKeySet(listChatCommands())]).toEqual(expect.arrayContaining(["dock:slack"]));
488+const slackCommandKeys = commandKeySet(listChatCommands());
489+expect(slackCommandKeys.has("dock:discord")).toBe(false);
490+expect(slackCommandKeys.has("dock:slack")).toBe(true);
495491});
496492497493it("refreshes text-command gating when pinned-empty fallback active registry changes", () => {
@@ -701,8 +697,10 @@ describe("commands registry args", () => {
701697const seenChoice = requireSeenChoice(seen);
702698expect(seenChoice.commandKey).toBe("think");
703699expect(seenChoice.argName).toBe("level");
704-expect(seenChoice.provider).toEqual(expect.stringMatching(/\S/));
705-expect(seenChoice.model).toEqual(expect.stringMatching(/\S/));
700+expect(typeof seenChoice.provider).toBe("string");
701+expect(seenChoice.provider?.trim().length).toBeGreaterThan(0);
702+expect(typeof seenChoice.model).toBe("string");
703+expect(seenChoice.model?.trim().length).toBeGreaterThan(0);
706704expect(seenChoice.catalogLength).toBe(0);
707705});
708706此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。