diff --git a/packages/lint/src/rules/media.test.ts b/packages/lint/src/rules/media.test.ts index 908e05491d..aac27a0e67 100644 --- a/packages/lint/src/rules/media.test.ts +++ b/packages/lint/src/rules/media.test.ts @@ -354,6 +354,7 @@ describe("media rules", () => { expect(hint).toContain('id="wrap"'); expect(hint).toContain('data-start="2"'); expect(hint).not.toContain('data-start="0"'); + expect(hint).toContain("takes no timing from it"); // The hint's one step: the video leaves the wrapper and takes its timing. const followed = await codes( @@ -552,6 +553,21 @@ describe("media rules", () => { expect(found).toContain("video_audio_double_source"); }); + it("says a timed video inside a timed wrapper gets no timing from the wrapper, so the wrapper stays untimed", async () => { + const result = await lintHyperframeHtml(` + +
+
+ +
+
+ +`); + const hint = result.findings.find((f) => f.code === "video_nested_in_timed_element")?.fixHint; + expect(hint).toContain("takes no timing from its wrapper"); + expect(hint).not.toContain("wrapper OR the video"); + }); + it("does NOT flag