Skip to content

Commit cf082c4

Browse files
committed
test(studio): nested composition reads expect the cookie-free request studioApiFetch sends
1 parent 590e140 commit cf082c4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/studio/src/hooks/timelineTimingSync.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ describe("a timing edit's soft reload restores what GSAP wrote from the files",
593593

594594
expect(fetchMock).toHaveBeenCalledWith(
595595
expect.stringContaining("/files/compositions%2Fsub.html"),
596+
{ credentials: "omit" },
596597
);
597598
expect(reloadPreview).not.toHaveBeenCalled();
598599
expect(wt.getAttribute("style")).toBe("left: 700px;");

‎packages/studio/src/hooks/useGsapScriptCommits.test.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,9 @@ describe("runCommit — instantPatch wiring", () => {
641641
await deps.api.commitMutation(selection, { x: 10 }, { label: "drag", softReload: true });
642642
});
643643

644-
expect(fetch).toHaveBeenCalledWith(expect.stringContaining("/files/compositions%2Fsub.html"));
644+
expect(fetch).toHaveBeenCalledWith(expect.stringContaining("/files/compositions%2Fsub.html"), {
645+
credentials: "omit",
646+
});
645647
expect(applySoftReload).toHaveBeenCalledWith(
646648
expect.anything(),
647649
NESTED_SCRIPT,

0 commit comments

Comments
 (0)