mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 09:51:24 +00:00
chore: Fix types in tests 34/N.
This commit is contained in:
@@ -40,7 +40,8 @@ describe("createLocalShellRunner", () => {
|
||||
|
||||
const firstRun = runLocalShellLine("!ls");
|
||||
expect(openOverlay).toHaveBeenCalledTimes(1);
|
||||
lastSelector?.onSelect?.({ value: "no", label: "No" });
|
||||
const selector = lastSelector as ReturnType<typeof createSelector> | null;
|
||||
selector?.onSelect?.({ value: "no", label: "No" });
|
||||
await firstRun;
|
||||
|
||||
await runLocalShellLine("!pwd");
|
||||
|
||||
@@ -30,7 +30,10 @@ describe("createOverlayHandlers", () => {
|
||||
setFocus,
|
||||
};
|
||||
|
||||
const { openOverlay, closeOverlay } = createOverlayHandlers(host, new DummyComponent());
|
||||
const { openOverlay, closeOverlay } = createOverlayHandlers(
|
||||
host as unknown as Parameters<typeof createOverlayHandlers>[0],
|
||||
new DummyComponent(),
|
||||
);
|
||||
const overlay = new DummyComponent();
|
||||
|
||||
openOverlay(overlay);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { GatewayChatClient } from "./gateway-chat.js";
|
||||
import { createSessionActions } from "./tui-session-actions.js";
|
||||
import type { TuiStateAccess } from "./tui-types.js";
|
||||
|
||||
@@ -49,7 +50,7 @@ describe("tui session actions", () => {
|
||||
const requestRender = vi.fn();
|
||||
|
||||
const { refreshSessionInfo } = createSessionActions({
|
||||
client: { listSessions } as { listSessions: typeof listSessions },
|
||||
client: { listSessions } as unknown as GatewayChatClient,
|
||||
chatLog: { addSystem: vi.fn() } as unknown as import("./components/chat-log.js").ChatLog,
|
||||
tui: { requestRender } as unknown as import("@mariozechner/pi-tui").TUI,
|
||||
opts: {},
|
||||
|
||||
Reference in New Issue
Block a user