Files
langgraph/libs/cli/js-examples/tests/graph.int.test.ts
74c8589045 Add support for Docker arg passthrough in langgraph CLI (#2206)
Added a js-example to show it builds
Adapted integration tests after removing the test CLI command

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-10-29 22:33:40 -07:00

19 lines
717 B
TypeScript

import { describe, it, expect } from "@jest/globals";
import { graph } from "../src/agent/graph.js";
describe("Graph", () => {
it("should process input through the graph", async () => {
const input = "What is the capital of France?";
const result = await graph.invoke({ input });
expect(result).toBeDefined();
expect(typeof result).toBe("object");
expect(result.messages).toBeDefined();
expect(Array.isArray(result.messages)).toBe(true);
expect(result.messages.length).toBeGreaterThan(0);
const lastMessage = result.messages[result.messages.length - 1];
expect(lastMessage.content.toString().toLowerCase()).toContain("hi");
}, 30000); // Increased timeout to 30 seconds
});