mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
fix(test): restore long dep for full vitest gate
This commit is contained in:
@@ -368,6 +368,7 @@
|
||||
"json5": "^2.2.3",
|
||||
"jszip": "^3.10.1",
|
||||
"linkedom": "^0.18.12",
|
||||
"long": "^5.3.2",
|
||||
"markdown-it": "^14.1.1",
|
||||
"node-edge-tts": "^1.2.10",
|
||||
"opusscript": "^0.1.1",
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -133,6 +133,9 @@ importers:
|
||||
linkedom:
|
||||
specifier: ^0.18.12
|
||||
version: 0.18.12
|
||||
long:
|
||||
specifier: ^5.3.2
|
||||
version: 5.3.2
|
||||
markdown-it:
|
||||
specifier: ^14.1.1
|
||||
version: 14.1.1
|
||||
|
||||
@@ -122,9 +122,12 @@ describe("fetchBrowserJson loopback auth", () => {
|
||||
it("preserves dispatcher error context while keeping no-retry hint", async () => {
|
||||
mocks.dispatch.mockRejectedValueOnce(new Error("Chrome CDP handshake timeout"));
|
||||
|
||||
const thrown = await fetchBrowserJson<{ ok: boolean }>("/tabs").catch((err) => err as Error);
|
||||
const thrown = await fetchBrowserJson<{ ok: boolean }>("/tabs").catch((err: unknown) => err);
|
||||
|
||||
expect(thrown).toBeInstanceOf(Error);
|
||||
if (!(thrown instanceof Error)) {
|
||||
throw new Error(`Expected Error, got ${String(thrown)}`);
|
||||
}
|
||||
expect(thrown.message).toContain("Chrome CDP handshake timeout");
|
||||
expect(thrown.message).toContain("Do NOT retry the browser tool");
|
||||
expect(thrown.message).not.toContain("Can't reach the OpenClaw browser control service");
|
||||
@@ -139,10 +142,13 @@ describe("fetchBrowserJson loopback auth", () => {
|
||||
);
|
||||
|
||||
const thrown = await fetchBrowserJson<{ ok: boolean }>("http://example.com/").catch(
|
||||
(err) => err as Error,
|
||||
(err: unknown) => err,
|
||||
);
|
||||
|
||||
expect(thrown).toBeInstanceOf(Error);
|
||||
if (!(thrown instanceof Error)) {
|
||||
throw new Error(`Expected Error, got ${String(thrown)}`);
|
||||
}
|
||||
expect(thrown.message).toContain("Can't reach the OpenClaw browser control service");
|
||||
expect(thrown.message).toContain("Do NOT retry the browser tool");
|
||||
});
|
||||
|
||||
@@ -59,7 +59,6 @@ export type AppViewState = {
|
||||
chatToolMessages: unknown[];
|
||||
chatStreamSegments: Array<{ text: string; ts: number }>;
|
||||
chatStream: string | null;
|
||||
chatStreamSegments: Array<{ text: string; ts: number }>;
|
||||
chatStreamStartedAt: number | null;
|
||||
chatRunId: string | null;
|
||||
compactionStatus: CompactionStatus | null;
|
||||
|
||||
Reference in New Issue
Block a user