





















@@ -205,32 +205,18 @@ describe("discord live qa runtime", () => {
205205{ statusReactionsToolOnly: true },
206206);
207207208-expect(next.messages).toMatchObject({
209-ackReaction: "👀",
210-ackReactionScope: "all",
211-groupChat: { visibleReplies: "message_tool" },
212-statusReactions: {
213-enabled: true,
214-timing: { debounceMs: 0 },
215-},
216-});
217-expect(next.channels?.discord).toMatchObject({
218-accounts: {
219-sut: {
220-allowBots: true,
221-guilds: {
222-"123456789012345678": {
223-requireMention: false,
224-channels: {
225-"223456789012345678": {
226-requireMention: false,
227-},
228-},
229-},
230-},
231-},
232-},
233-});
208+expect(next.messages?.ackReaction).toBe("👀");
209+expect(next.messages?.ackReactionScope).toBe("all");
210+expect(next.messages?.groupChat?.visibleReplies).toBe("message_tool");
211+expect(next.messages?.statusReactions?.enabled).toBe(true);
212+expect(next.messages?.statusReactions?.timing?.debounceMs).toBe(0);
213+const discordAccount = next.channels?.discord?.accounts?.sut;
214+expect(discordAccount?.allowBots).toBe(true);
215+expect(discordAccount?.guilds?.["123456789012345678"]?.requireMention).toBe(false);
216+expect(
217+discordAccount?.guilds?.["123456789012345678"]?.channels?.["223456789012345678"]
218+?.requireMention,
219+).toBe(false);
234220});
235221236222it("normalizes observed Discord messages", () => {
@@ -539,15 +525,12 @@ describe("discord live qa runtime", () => {
539525),
540526);
541527542-await expect(
543-__testing.resolveDiscordQaVoiceChannel({
544-token: "token",
545-guildId: "123456789012345678",
546-}),
547-).resolves.toMatchObject({
548-id: "523456789012345678",
549-name: "qa-voice",
528+const voiceChannel = await __testing.resolveDiscordQaVoiceChannel({
529+token: "token",
530+guildId: "123456789012345678",
550531});
532+expect(voiceChannel.id).toBe("523456789012345678");
533+expect(voiceChannel.name).toBe("qa-voice");
551534});
552535553536it("normalizes missing current Discord voice state to null", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。