mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 00:18:26 +00:00
chore: Fix types in tests 18/N.
This commit is contained in:
@@ -433,8 +433,8 @@ describe("gateway server chat", () => {
|
||||
|
||||
const res = await waitP;
|
||||
expect(res.ok).toBe(true);
|
||||
expect(res.payload.status).toBe("ok");
|
||||
expect(res.payload.startedAt).toBe(200);
|
||||
expect(res.payload?.status).toBe("ok");
|
||||
expect(res.payload?.startedAt).toBe(200);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -449,8 +449,8 @@ describe("gateway server chat", () => {
|
||||
timeoutMs: 1000,
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
expect(res.payload.status).toBe("ok");
|
||||
expect(res.payload.startedAt).toBe(50);
|
||||
expect(res.payload?.status).toBe("ok");
|
||||
expect(res.payload?.startedAt).toBe(50);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -459,7 +459,7 @@ describe("gateway server chat", () => {
|
||||
timeoutMs: 30,
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
expect(res.payload.status).toBe("timeout");
|
||||
expect(res.payload?.status).toBe("timeout");
|
||||
}
|
||||
|
||||
{
|
||||
@@ -478,8 +478,8 @@ describe("gateway server chat", () => {
|
||||
|
||||
const res = await waitP;
|
||||
expect(res.ok).toBe(true);
|
||||
expect(res.payload.status).toBe("error");
|
||||
expect(res.payload.error).toBe("boom");
|
||||
expect(res.payload?.status).toBe("error");
|
||||
expect(res.payload?.error).toBe("boom");
|
||||
}
|
||||
|
||||
{
|
||||
@@ -504,9 +504,9 @@ describe("gateway server chat", () => {
|
||||
|
||||
const res = await waitP;
|
||||
expect(res.ok).toBe(true);
|
||||
expect(res.payload.status).toBe("ok");
|
||||
expect(res.payload.startedAt).toBe(123);
|
||||
expect(res.payload.endedAt).toBe(456);
|
||||
expect(res.payload?.status).toBe("ok");
|
||||
expect(res.payload?.startedAt).toBe(123);
|
||||
expect(res.payload?.endedAt).toBe(456);
|
||||
}
|
||||
} finally {
|
||||
webchatWs.close();
|
||||
|
||||
@@ -10,7 +10,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { thinkingLevel: "off" },
|
||||
patch: { key: "agent:main:main", thinkingLevel: "off" },
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -27,7 +27,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { thinkingLevel: null },
|
||||
patch: { key: "agent:main:main", thinkingLevel: null },
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -42,7 +42,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: "off" },
|
||||
patch: { key: "agent:main:main", elevatedLevel: "off" },
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -57,7 +57,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: "on" },
|
||||
patch: { key: "agent:main:main", elevatedLevel: "on" },
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -74,7 +74,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: null },
|
||||
patch: { key: "agent:main:main", elevatedLevel: null },
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -89,7 +89,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { elevatedLevel: "maybe" },
|
||||
patch: { key: "agent:main:main", elevatedLevel: "maybe" },
|
||||
});
|
||||
expect(res.ok).toBe(false);
|
||||
if (res.ok) {
|
||||
@@ -114,8 +114,8 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { model: "openai/gpt-5.2" },
|
||||
loadGatewayModelCatalog: async () => [{ provider: "openai", id: "gpt-5.2" }],
|
||||
patch: { key: "agent:main:main", model: "openai/gpt-5.2" },
|
||||
loadGatewayModelCatalog: async () => [{ provider: "openai", id: "gpt-5.2", name: "gpt-5.2" }],
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -134,7 +134,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:subagent:child",
|
||||
patch: { spawnDepth: 2 },
|
||||
patch: { key: "agent:main:subagent:child", spawnDepth: 2 },
|
||||
});
|
||||
expect(res.ok).toBe(true);
|
||||
if (!res.ok) {
|
||||
@@ -149,7 +149,7 @@ describe("gateway sessions patch", () => {
|
||||
cfg: {} as OpenClawConfig,
|
||||
store,
|
||||
storeKey: "agent:main:main",
|
||||
patch: { spawnDepth: 1 },
|
||||
patch: { key: "agent:main:main", spawnDepth: 1 },
|
||||
});
|
||||
expect(res.ok).toBe(false);
|
||||
if (res.ok) {
|
||||
|
||||
Reference in New Issue
Block a user