diff --git a/packages/studio/src/hooks/useClipboard.sealed.test.ts b/packages/studio/src/hooks/useClipboard.sealed.test.ts
index 728aa00bc2..5a3396b34d 100644
--- a/packages/studio/src/hooks/useClipboard.sealed.test.ts
+++ b/packages/studio/src/hooks/useClipboard.sealed.test.ts
@@ -220,7 +220,8 @@ function handlersServed(written: string): string[] {
);
}
-// fails without the fix: a comment in an svg
passed the check, and the server's parser serves it as markup.
+// fails without the fix: a comment in an svg passed the check, and the server's parser serves it as markup;
+// then the live copy still wrote the comment.
it("writes nothing the server serves as running code, from the live copy or a saved one", async () => {
const svg = "";
const live = sealedClipboard(
@@ -229,7 +230,9 @@ it("writes nothing the server serves as running code, from the live copy or a sa
);
expect(live.clipboard().handleCopy()).toBe(true);
await live.clipboard().handlePaste();
+ expect(live.writes.length).toBeGreaterThan(0);
for (const file of live.writes) expect(handlersServed(file)).toEqual([]);
+ for (const file of live.writes) expect(file).not.toContain("',
+ '',
+ ])("writes no comment from the copy %s", (html) => {
+ for (const readFrom of [null, "compositions/recv.html"]) {
+ const pasted = pasteElementHtml(FILE, { html, readFrom }, false, "index.html");
+ const clip = { html, readFrom, start: 0, duration: 1, track: 1 };
+ const placed = pasteTimelineClips(FILE, [clip], 0, [], false, "index.html").content;
+ for (const file of [pasted, placed]) {
+ expect(file).not.toContain("