mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-11-30 18:02:50 +08:00
test(bilibili): check recovery request context
This commit is contained in:
1 parent
d0e1422af7
commit
23b36e2019
1 file changed
+1
-1
@@ -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");
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user