Files
PaperClipAI/tests/runner-e2e/continuation-fixtures.test.ts
T
DottaandPaperclip 8fb291310d Exercise installed legacy skills and grade real continuation outputs
Initialize the operational skill for legacy continuation fixtures, verify task attachment bytes, allow Claude’s optional custom-answer field, and distinguish unstarted dependency-blocked wakes from failed provider executions.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-09-18 22:05:48 -05:00

14 lines
915 B
TypeScript

import { expect, it, vi } from "vitest";
import type { RunnerApi } from "./api.js";
import { prepareLegacyContinuationSkill } from "./continuation-fixtures.js";
it("initializes the production library and assigns the operational skill before execution", async () => {
const post = vi.fn();
const get = vi.fn(async () => [{ key: "paperclipai/paperclip/paperclip" }]);
await prepareLegacyContinuationSkill({ get, post } as unknown as RunnerApi, "company", "agent");
expect(get).toHaveBeenCalledWith("/api/companies/company/skills");
expect(post).toHaveBeenCalledWith("/api/agents/agent/skills/sync?companyId=company", { desiredSkills: ["paperclipai/paperclip/paperclip"], mode: "add" });
get.mockResolvedValue([]);
await expect(prepareLegacyContinuationSkill({ get, post } as unknown as RunnerApi, "company", "agent")).rejects.toThrow("missing the bundled");
expect(post).toHaveBeenCalledTimes(1);
});