forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-content.test.ts
More file actions
43 lines (38 loc) · 1.31 KB
/
Copy pathsetup-content.test.ts
File metadata and controls
43 lines (38 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { describe, expect, it } from "vitest";
import { resolveBundledSetupConcept, setupContentKey } from "../setup-content";
import type { SetupContentBundle } from "../setup-content";
const bundle: SetupContentBundle = {
version: 1,
concepts: {
"langgraph-python::agent-setup": {
framework: "langgraph-python",
concept: "agent-setup",
source: "# LangGraph setup\n",
},
},
};
describe("setup content bundle", () => {
it("uses framework and concept as the stable lookup key", () => {
expect(setupContentKey("langgraph-python", "agent-setup")).toBe(
"langgraph-python::agent-setup",
);
});
it("returns the bundled source when the framework concept exists", () => {
expect(
resolveBundledSetupConcept("langgraph-python", "agent-setup", bundle),
).toBe("# LangGraph setup\n");
});
it("falls back from LangGraph FastAPI to the Python setup content", () => {
expect(
resolveBundledSetupConcept("langgraph-fastapi", "agent-setup", bundle),
).toBe("# LangGraph setup\n");
});
it("returns null when the framework concept is absent", () => {
expect(
resolveBundledSetupConcept("google-adk", "agent-setup", bundle),
).toBe(null);
expect(
resolveBundledSetupConcept("langgraph-python", "missing", bundle),
).toBe(null);
});
});