Merges FN-3396's full Cursor CLI provider integration (Steps 1–4): defines a CLI-backed provider contract, adds the `fusion-plugin-cursor-runtime` plugin package with process management and runtime probes, wires dashboard auth flows and UI (ProviderCard, onboarding modal, settings), and bundles the Fusion-Task-Id: FN-3396
22 lines
848 B
TypeScript
22 lines
848 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { CursorRuntimeAdapter } from "../runtime-adapter.js";
|
|
|
|
describe("CursorRuntimeAdapter", () => {
|
|
it("creates a session with default model fallback", async () => {
|
|
const adapter = new CursorRuntimeAdapter();
|
|
const result = await adapter.createSession({ systemPrompt: "sys" });
|
|
expect(result.session.model).toBe("cursor/default");
|
|
expect(result.session.systemPrompt).toBe("sys");
|
|
});
|
|
|
|
it("promptWithFallback resolves without throwing", async () => {
|
|
const adapter = new CursorRuntimeAdapter();
|
|
await expect(adapter.promptWithFallback()).resolves.toBeUndefined();
|
|
});
|
|
|
|
it("describeModel formats cursor prefix", () => {
|
|
const adapter = new CursorRuntimeAdapter();
|
|
expect(adapter.describeModel({ model: "cursor/pro" })).toBe("cursor/cursor/pro");
|
|
});
|
|
});
|