

























@@ -81,13 +81,12 @@ describe("startQaLiveLaneGateway", () => {
8181});
82828383expect(startQaProviderServer).toHaveBeenCalledWith("mock-openai");
84-expect(startQaGatewayChild).toHaveBeenCalledWith(
85-expect.objectContaining({
86-transportBaseUrl: "http://127.0.0.1:43123",
87-providerBaseUrl: "http://127.0.0.1:44080/v1",
88-providerMode: "mock-openai",
89-}),
90-);
84+const gatewayOptions = startQaGatewayChild.mock.calls[0]?.[0] as
85+| { providerBaseUrl?: string; providerMode?: string; transportBaseUrl?: string }
86+| undefined;
87+expect(gatewayOptions?.transportBaseUrl).toBe("http://127.0.0.1:43123");
88+expect(gatewayOptions?.providerBaseUrl).toBe("http://127.0.0.1:44080/v1");
89+expect(gatewayOptions?.providerMode).toBe("mock-openai");
91909291await harness.stop();
9392expect(gatewayStop).toHaveBeenCalledTimes(1);
@@ -138,18 +137,12 @@ describe("startQaLiveLaneGateway", () => {
138137139138expect(cfg?.plugins?.allow).toEqual(["acpx", "qa-channel"]);
140139expect(cfg?.plugins?.entries).not.toHaveProperty("memory-core");
141-expect(cfg?.plugins?.slots).toMatchObject({
142-memory: "none",
143-contextEngine: "qmd",
144-});
145-expect(cfg?.agents?.defaults?.memorySearch).toMatchObject({
146-enabled: false,
147-sync: {
148-onSearch: false,
149-onSessionStart: false,
150-watch: false,
151-},
152-});
140+expect(cfg?.plugins?.slots?.memory).toBe("none");
141+expect(cfg?.plugins?.slots?.contextEngine).toBe("qmd");
142+expect(cfg?.agents?.defaults?.memorySearch?.enabled).toBe(false);
143+expect(cfg?.agents?.defaults?.memorySearch?.sync?.onSearch).toBe(false);
144+expect(cfg?.agents?.defaults?.memorySearch?.sync?.onSessionStart).toBe(false);
145+expect(cfg?.agents?.defaults?.memorySearch?.sync?.watch).toBe(false);
153146});
154147155148it("forwards gateway stop options to the child harness", async () => {
@@ -180,13 +173,12 @@ describe("startQaLiveLaneGateway", () => {
180173});
181174182175expect(startQaProviderServer).toHaveBeenCalledWith("live-frontier");
183-expect(startQaGatewayChild).toHaveBeenCalledWith(
184-expect.objectContaining({
185-transportBaseUrl: "http://127.0.0.1:43123",
186-providerBaseUrl: undefined,
187-providerMode: "live-frontier",
188-}),
189-);
176+const gatewayOptions = startQaGatewayChild.mock.calls[0]?.[0] as
177+| { providerBaseUrl?: string; providerMode?: string; transportBaseUrl?: string }
178+| undefined;
179+expect(gatewayOptions?.transportBaseUrl).toBe("http://127.0.0.1:43123");
180+expect(gatewayOptions?.providerBaseUrl).toBeUndefined();
181+expect(gatewayOptions?.providerMode).toBe("live-frontier");
190182191183await harness.stop();
192184expect(gatewayStop).toHaveBeenCalledTimes(1);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。