mirror of
https://github.com/morluto/rea.git
synced 2026-11-22 22:45:47 +00:00
test(mcp): consolidate admission and lifecycle checks (#12833)
* test(mcp): consolidate canonical batch capacity checks * test(mcp): keep separate cold-start prompt checks * test(mcp): consolidate byte entropy request checks * test(mcp): consolidate progress checks and remove waiting sleeps
This commit is contained in:
1 parent
01895d33ef
commit
bb7bdd2fba
7 files changed
+82
-146
No files matched your search
@@ -354,8 +354,9 @@ it.each(["legacy", "auto"] as const)(
|
||||
},
|
||||
);
|
||||
|
||||
it("initializes through prompt retrieval or completion without an internal client", async () => {
|
||||
it("completes a prompt argument as the first operation", async () => {
|
||||
const f = await fixture();
|
||||
expect(f.loads()).toBe(0);
|
||||
expect(
|
||||
(
|
||||
await f.client.complete({
|
||||
@@ -364,24 +365,21 @@ it("initializes through prompt retrieval or completion without an internal clien
|
||||
})
|
||||
).completion.values,
|
||||
).toEqual(["Example"]);
|
||||
expect(
|
||||
(
|
||||
await f.client.getPrompt({
|
||||
name: "explain",
|
||||
arguments: { document: "Example" },
|
||||
})
|
||||
).messages[0]?.content,
|
||||
).toEqual({ type: "text", text: "Example" });
|
||||
expect(f.loads()).toBe(1);
|
||||
});
|
||||
|
||||
it("retrieves a prompt as the first operation", async () => {
|
||||
const f = await fixture();
|
||||
expect(f.loads()).toBe(0);
|
||||
const result = await f.client.getPrompt({
|
||||
name: "explain",
|
||||
arguments: { document: "Example" },
|
||||
});
|
||||
expect(result.messages).toHaveLength(1);
|
||||
expect(result.messages[0]?.content).toEqual({
|
||||
type: "text",
|
||||
text: "Example",
|
||||
});
|
||||
expect(f.loads()).toBe(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user