From 8c22ddba0fda22c3ec6faa83f4686249804d299d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sun, 1 Nov 2026 06:16:39 +0000 Subject: [PATCH] fix(cli): snapshot warns when self-closed audio or video clips have swallowed the page (#6915) --- .../commands/snapshot.selfClosedMedia.test.ts | 29 +++++++++++++++++++ packages/cli/src/commands/snapshot.ts | 22 ++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 packages/cli/src/commands/snapshot.selfClosedMedia.test.ts diff --git a/packages/cli/src/commands/snapshot.selfClosedMedia.test.ts b/packages/cli/src/commands/snapshot.selfClosedMedia.test.ts new file mode 100644 index 0000000000..9e2077c6d8 --- /dev/null +++ b/packages/cli/src/commands/snapshot.selfClosedMedia.test.ts @@ -0,0 +1,29 @@ +import { describe, expect, it } from "vitest"; +import { selfClosedMediaWarning } from "./snapshot.js"; + +const page = (media: string) => ` +
+${media} +

Hello

`; + +describe("selfClosedMediaWarning", () => { + it("names the self-closed clips and what they do to the still", async () => { + const clips = Array.from( + { length: 3 }, + (_, i) => `