Skip to content

Commit

Permalink
Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dglazkov committed Dec 10, 2024
1 parent 45502a8 commit e8ba935
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions packages/breadboard/tests/node/inspect/graph-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ describe("GraphStore.graphs", () => {
const graphStore = makeTestGraphStore({
kits: [testKit],
});
deepStrictEqual(graphStore.graphs(), [
{ mainGraph: { title: "Test Kit" }, url: "invoke" },
{
mainGraph: { title: "Test Kit" },
url: "map",
title: "Map",
tags: ["experimental"],
},
{ mainGraph: { title: "Test Kit" }, url: "promptTemplate" },
{ url: "runJavascript", mainGraph: { title: "Test Kit" } },
{ url: "secrets", mainGraph: { title: "Test Kit" } },
]);
deepStrictEqual(
graphStore.graphs().map((graph) => graph.url),
[
"invoke",
"map",
"promptTemplate",
"runJavascript",
"secrets",
"input",
"output",
"comment",
]
);
});

it("correctly lists added graphs", () => {
Expand All @@ -38,22 +39,19 @@ describe("GraphStore.graphs", () => {
nodes: [],
edges: [],
});
deepStrictEqual(graphStore.graphs(), [
{ mainGraph: { title: "Test Kit" }, url: "invoke" },
{
mainGraph: { title: "Test Kit" },
url: "map",
title: "Map",
tags: ["experimental"],
},
{ mainGraph: { title: "Test Kit" }, url: "promptTemplate" },
{ url: "runJavascript", mainGraph: { title: "Test Kit" } },
{ url: "secrets", mainGraph: { title: "Test Kit" } },
{
title: "Foo",
url: "https://example.com/foo",
mainGraph: { title: "Foo", url: "https://example.com/foo" },
},
]);
deepStrictEqual(
graphStore.graphs().map((graph) => graph.url),
[
"invoke",
"map",
"promptTemplate",
"runJavascript",
"secrets",
"input",
"output",
"comment",
"https://example.com/foo",
]
);
});
});

0 comments on commit e8ba935

Please sign in to comment.