style(test): biome format
This commit is contained in:
@@ -481,7 +481,10 @@ describe("gateway server", () => {
|
|||||||
await server.close();
|
await server.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("agent ack response then final response", { timeout: 8000 }, async () => {
|
test(
|
||||||
|
"agent ack response then final response",
|
||||||
|
{ timeout: 8000 },
|
||||||
|
async () => {
|
||||||
const { server, ws } = await startServerWithClient();
|
const { server, ws } = await startServerWithClient();
|
||||||
ws.send(
|
ws.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
@@ -502,12 +505,16 @@ describe("gateway server", () => {
|
|||||||
const ackP = onceMessage(
|
const ackP = onceMessage(
|
||||||
ws,
|
ws,
|
||||||
(o) =>
|
(o) =>
|
||||||
o.type === "res" && o.id === "ag1" && o.payload?.status === "accepted",
|
o.type === "res" &&
|
||||||
|
o.id === "ag1" &&
|
||||||
|
o.payload?.status === "accepted",
|
||||||
);
|
);
|
||||||
const finalP = onceMessage(
|
const finalP = onceMessage(
|
||||||
ws,
|
ws,
|
||||||
(o) =>
|
(o) =>
|
||||||
o.type === "res" && o.id === "ag1" && o.payload?.status !== "accepted",
|
o.type === "res" &&
|
||||||
|
o.id === "ag1" &&
|
||||||
|
o.payload?.status !== "accepted",
|
||||||
);
|
);
|
||||||
ws.send(
|
ws.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
@@ -526,7 +533,8 @@ describe("gateway server", () => {
|
|||||||
|
|
||||||
ws.close();
|
ws.close();
|
||||||
await server.close();
|
await server.close();
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
test(
|
test(
|
||||||
"agent dedupes by idempotencyKey after completion",
|
"agent dedupes by idempotencyKey after completion",
|
||||||
|
|||||||
@@ -74,7 +74,10 @@ describe("tau-rpc", () => {
|
|||||||
expect(writes.length).toBeGreaterThan(0);
|
expect(writes.length).toBeGreaterThan(0);
|
||||||
const first = writes[0]?.trim();
|
const first = writes[0]?.trim();
|
||||||
expect(first?.endsWith("\n")).toBe(false);
|
expect(first?.endsWith("\n")).toBe(false);
|
||||||
const obj = JSON.parse(first ?? "{}") as { type?: string; message?: unknown };
|
const obj = JSON.parse(first ?? "{}") as {
|
||||||
|
type?: string;
|
||||||
|
message?: unknown;
|
||||||
|
};
|
||||||
expect(obj.type).toBe("prompt");
|
expect(obj.type).toBe("prompt");
|
||||||
expect(obj.message).toBe("hello");
|
expect(obj.message).toBe("hello");
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user