Files
fusion/plugins/fusion-plugin-cursor-runtime/src/__tests__/runtime-adapter.test.ts
Fusion 3735e0565a feat(FN-3396): bundle Cursor CLI as a plugin provider with dashboard auth w
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
2026-05-07 04:17:52 -07:00

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");
});
});