test(runner): await active suspension state
This commit is contained in:
parent
2cf19a8de0
commit
a418938524
|
|
@ -211,13 +211,15 @@ describe("ACPX runtime host", () => {
|
|||
expect(createRuntime).not.toHaveBeenCalled();
|
||||
expect(fixture.commandClose).toHaveBeenCalledOnce();
|
||||
const authPath = join(credentialHome, "auth.json");
|
||||
const contender = await vi.waitFor(() =>
|
||||
stageManagedCodexCredential({
|
||||
agentHomeDirectory: credentialHome,
|
||||
environment: {
|
||||
PAPERCLIP_ACPX_CODEX_AUTH_JSON_SECRET: '{"owner":"contender"}',
|
||||
},
|
||||
}),
|
||||
const contender = await vi.waitFor(
|
||||
() =>
|
||||
stageManagedCodexCredential({
|
||||
agentHomeDirectory: credentialHome,
|
||||
environment: {
|
||||
PAPERCLIP_ACPX_CODEX_AUTH_JSON_SECRET: '{"owner":"contender"}',
|
||||
},
|
||||
}),
|
||||
{ timeout: 5_000 },
|
||||
);
|
||||
await contender.close();
|
||||
await expect(readFile(authPath)).rejects.toMatchObject({ code: "ENOENT" });
|
||||
|
|
|
|||
|
|
@ -2103,6 +2103,12 @@ it("persists an active provider as settled before bounded suspension", async ()
|
|||
await bundle.transport.request("turn/start", {
|
||||
input: [{ type: "text", text: "Wait for another instruction." }],
|
||||
});
|
||||
const notifications = bundle.transport
|
||||
.notifications()
|
||||
[Symbol.asyncIterator]();
|
||||
await expect(notifications.next()).resolves.toMatchObject({
|
||||
value: { method: "turn/started" },
|
||||
});
|
||||
await bundle.transport.close();
|
||||
|
||||
const providerState = JSON.parse(
|
||||
|
|
|
|||
Loading…
Reference in New Issue