Files
kandev/apps/web/components/task/task-page-editor-capability.test.ts
T
2026-07-30 22:24:16 +01:00

15 lines
649 B
TypeScript

import { describe, expect, it } from "vitest";
import { getEmbeddedVscodeSupported } from "./task-page-editor-capability";
describe("getEmbeddedVscodeSupported", () => {
it("fails closed while session capability data is missing", () => {
expect(getEmbeddedVscodeSupported(null)).toBe(false);
expect(getEmbeddedVscodeSupported({})).toBe(false);
});
it("uses the active session capability only when it is explicitly true", () => {
expect(getEmbeddedVscodeSupported({ capabilities: { embedded_vscode: true } })).toBe(true);
expect(getEmbeddedVscodeSupported({ capabilities: { embedded_vscode: false } })).toBe(false);
});
});