// @vitest-environment happy-dom import { describe, expect, it } from "vitest"; import { PREVIEW_RASTER_ATTR, RUNTIME_STAMPED_ATTR, STUDIO_PREVIEW_LAZY_ATTR, PREVIEW_VIDEO_CANVAS_ATTR, PREVIEW_VIDEO_FRAME_ATTR, PREVIEW_VIDEO_SOURCE_ATTR, } from "@hyperframes/core/studio-preview-mark"; import { authoredStyles, liveMarkupWithoutPreviewMarks } from "./authoredSource"; describe("liveMarkupWithoutPreviewMarks", () => { it("omits generated video surfaces and their hiding marks from copied composition markup", () => { const live = document.createElement("div"); live.innerHTML = ``; expect(liveMarkupWithoutPreviewMarks(live)).toBe( '
', ); expect(live.querySelectorAll("canvas")).toHaveLength(2); }); it("drops the preview's raster mark from an element and its descendants", () => { const live = document.createElement("div"); live.innerHTML = `
`;
expect(liveMarkupWithoutPreviewMarks(live)).toBe('