Files
vscode-cowriting-plugin/test/cline.test.ts
T
Ben Stull 33bff2b130 POC: vscode-free @cline/sdk driver with unit test (Feature #2)
fetchSdkSummary() dynamic-imports the ESM-only SDK and returns its build
version + builtin tool catalog (pure, key-free). Kept vscode-free so it is
unit-testable in Node; test asserts a semver version and the read_files tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 23:55:39 -07:00

16 lines
596 B
TypeScript

import { describe, it, expect } from "vitest";
import { fetchSdkSummary } from "../src/cline";
describe("fetchSdkSummary", () => {
it("loads @cline/sdk and returns its version and builtin tool catalog", async () => {
const summary = await fetchSdkSummary();
expect(summary.version).toMatch(/^\d+\.\d+\.\d+/);
expect(summary.tools.length).toBeGreaterThan(0);
expect(summary.tools.map((t) => t.id)).toContain("read_files");
for (const tool of summary.tools) {
expect(typeof tool.id).toBe("string");
expect(typeof tool.description).toBe("string");
}
});
});