docs: final review fixes — deferred backlog, doc accuracy, sample-data note
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
dd106c5d0e
commit
2ff58ace46
11 files changed
+103
-37
No files matched your search
@@ -48,6 +48,18 @@ describe("createAudioSlot", () => {
|
||||
expect(el.querySelectorAll("audio[src]")).toHaveLength(1);
|
||||
expect(el.querySelectorAll('button[data-start="30"]')).toHaveLength(1);
|
||||
});
|
||||
test("seek button sets currentTime and swallows a rejected play()", async () => {
|
||||
const { createAudioSlot } = await import("../src/shared/audio-slot");
|
||||
const song: Song = { ...base, audio: "/a.mp3", parts: [{ ...base.parts[0]!, startSec: 30 }] };
|
||||
const el = createAudioSlot(song);
|
||||
const audio = el.querySelector("audio") as HTMLAudioElement;
|
||||
let played = 0;
|
||||
audio.play = () => { played++; return Promise.reject(new Error("blocked")); };
|
||||
(el.querySelector("button.audio-slot__seek") as HTMLButtonElement).click();
|
||||
await Promise.resolve();
|
||||
expect(audio.currentTime).toBe(30);
|
||||
expect(played).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe("createVideoCards", () => {
|
||||
|
||||
Reference in new issue
Block a user