From 23b36e2019e78dfa07f93fa48e6cbd6f1f1e5b6e Mon Sep 17 00:00:00 2001 From: TIANYAO ZHANG <88520881+ZHANGTIANYAO1@users.noreply.github.com> Date: Wed, 18 Nov 2026 18:17:26 +0800 Subject: [PATCH] test(bilibili): check recovery request context --- src/bot/instance.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot/instance.test.ts b/src/bot/instance.test.ts index 9da915b..590ca07 100644 --- a/src/bot/instance.test.ts +++ b/src/bot/instance.test.ts @@ -1771,7 +1771,7 @@ describe("resumeInterruptedStream — long B站 streams dying mid-play (#161)", it("re-resolves the URL and resumes at the current position when a B站 stream ends early", async () => { const ctx = makeCtx({ elapsed: 1000, duration: 10_000 }); expect(await resumeInterruptedStream.call(ctx)).toBe(true); - expect(ctx.provider.getSongUrl).toHaveBeenCalledWith("BV1abc"); + expect(ctx.provider.getSongUrl).toHaveBeenCalledExactlyOnceWith("BV1abc", undefined, { avoidHosts: new Set() }); expect(ctx.player.play).toHaveBeenCalledWith("https://fresh.test/a.m4s", 1000, 10_000); expect(ctx.song.url).toBe("https://fresh.test/a.m4s"); });