


























@@ -412,7 +412,7 @@ describe("DiscordVoiceManager", () => {
412412expectConnectedStatus(manager, "1002");
413413});
414414415-it("does not throw when stale tracked voice connections are already destroyed", async () => {
415+it("skips destroying stale tracked voice connections that are already destroyed", async () => {
416416const staleConnection = createConnectionMock();
417417staleConnection.state.status = "destroyed";
418418staleConnection.destroy.mockImplementation(() => {
@@ -429,7 +429,7 @@ describe("DiscordVoiceManager", () => {
429429expect(staleConnection.destroy).not.toHaveBeenCalled();
430430});
431431432-it("does not throw when leaving an already destroyed voice connection", async () => {
432+it("skips destroying an already destroyed voice connection on leave", async () => {
433433const connection = createConnectionMock();
434434connection.destroy.mockImplementation(() => {
435435throw new Error("Cannot destroy VoiceConnection - it has already been destroyed");
@@ -1095,7 +1095,7 @@ describe("DiscordVoiceManager", () => {
10951095expect(agentCommandMock).toHaveBeenCalledTimes(1);
10961096});
109710971098-it("DiscordVoiceReadyListener: propagates autoJoin errors fire-and-forget without throwing", async () => {
1098+it("DiscordVoiceReadyListener: starts autoJoin fire-and-forget on ready", async () => {
10991099const manager = createManager();
11001100const autoJoinSpy = vi
11011101.spyOn(manager, "autoJoin")
@@ -1104,7 +1104,7 @@ describe("DiscordVoiceManager", () => {
11041104const { DiscordVoiceReadyListener } = managerModule;
11051105const listener = new DiscordVoiceReadyListener(manager);
110611061107-await expect(listener.handle(undefined, undefined as never)).resolves.not.toThrow();
1107+await expect(listener.handle(undefined, undefined as never)).resolves.toBeUndefined();
11081108expect(autoJoinSpy).toHaveBeenCalledTimes(1);
11091109});
11101110@@ -1115,7 +1115,7 @@ describe("DiscordVoiceManager", () => {
11151115const { DiscordVoiceResumedListener } = managerModule;
11161116const listener = new DiscordVoiceResumedListener(manager);
111711171118-await expect(listener.handle(undefined, undefined as never)).resolves.not.toThrow();
1118+await expect(listener.handle(undefined, undefined as never)).resolves.toBeUndefined();
11191119expect(autoJoinSpy).toHaveBeenCalledTimes(1);
11201120});
11211121});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。