mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-11 10:57:07 +00:00
test(server): await provider child reads in the replay and pi child tests
These tests came in with the main merge. The child store reads are asynchronous now, so the tests compared a promise with the expected child.
This commit is contained in:
+2
-2
@@ -88,7 +88,7 @@ describe("Claude workflow replay", () => {
|
||||
await store.apply("parent", "claude", event);
|
||||
}
|
||||
|
||||
expect(store.get("parent", TOOL_CALL_ID)).toMatchObject({
|
||||
expect(await store.get("parent", TOOL_CALL_ID)).toMatchObject({
|
||||
id: TOOL_CALL_ID,
|
||||
title: "Workflow",
|
||||
description: "Runs one deterministic child and returns its structured result",
|
||||
@@ -113,7 +113,7 @@ describe("Claude workflow replay", () => {
|
||||
await store.apply("parent", "claude", event);
|
||||
}
|
||||
|
||||
expect(store.get("parent", TOOL_CALL_ID)).toMatchObject({
|
||||
expect(await store.get("parent", TOOL_CALL_ID)).toMatchObject({
|
||||
id: TOOL_CALL_ID,
|
||||
title: "Workflow",
|
||||
description: "Structured result workflow",
|
||||
|
||||
+3
-1
@@ -52,7 +52,9 @@ describe("@gotgenes/pi-subagents adapter", () => {
|
||||
});
|
||||
for (const event of events) await store.apply("parent", "pi", event.event);
|
||||
expect(events.map(({ event }) => event.type)).toEqual(["upsert", "remove"]);
|
||||
expect(store.list("parent")).toMatchObject([{ id: "previous-child", status: "completed" }]);
|
||||
expect(await store.list("parent")).toMatchObject([
|
||||
{ id: "previous-child", status: "completed" },
|
||||
]);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user