修 twitch:于停机时取消待处理之客 · openclaw/openclaw@e9bf111
steipete
·
2026-05-24
·
via Recent Commits to openclaw:main
| 原文行号 | 差异行号 | 差异行变 |
|---|
@@ -227,6 +227,19 @@ describe("TwitchClientManager", () => {
|
227 | 227 | await expect(connection).rejects.toThrow("disconnected"); |
228 | 228 | }); |
229 | 229 | |
| 230 | +it("does not cache pending connections after disconnectAll", async () => { |
| 231 | +mockConnect.mockImplementationOnce(() => {}); |
| 232 | + |
| 233 | +const connection = manager.getClient(testAccount); |
| 234 | +await Promise.resolve(); |
| 235 | + |
| 236 | +await manager.disconnectAll(); |
| 237 | +authSuccessHandlers[0]?.(); |
| 238 | + |
| 239 | +await expect(connection).rejects.toThrow("Twitch connection cancelled"); |
| 240 | +expect(mockQuit).toHaveBeenCalledTimes(2); |
| 241 | +}); |
| 242 | + |
230 | 243 | it("should create separate clients for different accounts", async () => { |
231 | 244 | await manager.getClient(testAccount); |
232 | 245 | await manager.getClient(testAccount2); |
|
此內容由慣性聚合(RSS閱讀器)自動聚合整理,僅供閱讀參考。 原文來自 — 版權歸原作者所有。