test: compose unsafe export fixture with finalization ownership

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-27 18:28:32 -05:00
1 parent 9e3b48fc0c
commit b727a5659d
1 file changed
+4
@@ -2,6 +2,10 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
import type { Db } from "@paperclipai/db";
const sync = vi.hoisted(() => ({ resume: vi.fn() }));
vi.mock("./native-workspace-finalization-ownership.js", () => ({
withNativeWorkspaceFinalizationOwnership: async (_db: Db, _runId: string, action: (owner: unknown) => unknown) =>
action({ token: "fixture-owner", assertHeld: async () => {} }),
}));
vi.mock("./native-workspace-sync.js", () => ({
readNativeWorkspaceSyncReference: () => ({ leaseId: "lease", providerLeaseId: "sandbox", workspaceId: "workspace" }),
resumeNativeWorkspaceSync: sync.resume,