Skip to content

Commit a4d0706

Browse files
stephentoubCopilot
andcommitted
Scope re-enabled tests to stdio
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent a8e36fa commit a4d0706

2 files changed

Lines changed: 33 additions & 25 deletions

File tree

nodejs/test/e2e/factory.e2e.test.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,24 @@ it.skipIf(isInProcessTransport)(
9595

9696
// The timeout is generous because the factory abandons its subagent once the runtime has
9797
// accepted the request, so the run settles only after the runtime drains that work.
98-
it("forwards every declared subagent option to the runtime", async () => {
99-
if (!factoryTestContext) {
100-
throw new Error("Factory E2E requires the stdio transport");
101-
}
102-
const { workDir } = factoryTestContext;
103-
await using session = await setupFactoryExtension(workDir);
98+
it.skipIf(isInProcessTransport)(
99+
"forwards every declared subagent option to the runtime",
100+
async () => {
101+
if (!factoryTestContext) {
102+
throw new Error("Factory E2E requires the stdio transport");
103+
}
104+
const { workDir } = factoryTestContext;
105+
await using session = await setupFactoryExtension(workDir);
104106

105-
const result = await session.factory.run("forwards-subagent-options");
107+
const result = await session.factory.run("forwards-subagent-options");
106108

107-
expect(result).toMatchObject({
108-
status: "completed",
109-
result: { didThrow: false },
110-
});
111-
}, 60_000);
109+
expect(result).toMatchObject({
110+
status: "completed",
111+
result: { didThrow: false },
112+
});
113+
},
114+
60_000
115+
);
112116

113117
it.skipIf(isInProcessTransport)(
114118
"throws FactoryResumeError with not_found for an unknown run",

nodejs/test/e2e/rpc_ui_ephemeral_query.e2e.test.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@
44

55
import { describe, expect, it } from "vitest";
66
import { approveAll } from "../../src/index.js";
7-
import { createSdkTestContext } from "./harness/sdkTestContext.js";
7+
import { createSdkTestContext, isInProcessTransport } from "./harness/sdkTestContext.js";
88

99
describe("UI ephemeral query RPC", async () => {
1010
const { copilotClient: client } = await createSdkTestContext();
1111

12-
it("should answer ephemeral query", { timeout: 120_000 }, async () => {
13-
const session = await client.createSession({ onPermissionRequest: approveAll });
14-
try {
15-
const result = await session.rpc.ui.ephemeralQuery({
16-
question: "In one word, what is the primary color of a clear daytime sky?",
17-
});
12+
it.skipIf(isInProcessTransport)(
13+
"should answer ephemeral query",
14+
{ timeout: 120_000 },
15+
async () => {
16+
const session = await client.createSession({ onPermissionRequest: approveAll });
17+
try {
18+
const result = await session.rpc.ui.ephemeralQuery({
19+
question: "In one word, what is the primary color of a clear daytime sky?",
20+
});
1821

19-
expect(result).toBeDefined();
20-
expect(result.answer.trim()).toBeTruthy();
21-
expect(result.answer.toLowerCase()).toContain("blue");
22-
} finally {
23-
await session.disconnect();
22+
expect(result).toBeDefined();
23+
expect(result.answer.trim()).toBeTruthy();
24+
expect(result.answer.toLowerCase()).toContain("blue");
25+
} finally {
26+
await session.disconnect();
27+
}
2428
}
25-
});
29+
);
2630
});

0 commit comments

Comments
 (0)