test(webui): fix sidebar state lint

This commit is contained in:
chengyongru
2026-08-11 18:15:51 +08:00
parent 495a06f21a
commit 8071ac3b27
+2 -2
View File
@@ -4,7 +4,7 @@ import { describe, expect, it, vi } from "vitest";
import { useSidebarState } from "@/hooks/useSidebarState"; import { useSidebarState } from "@/hooks/useSidebarState";
import type { NanobotClient } from "@/lib/nanobot-client"; import type { NanobotClient } from "@/lib/nanobot-client";
import type { ConnectionStatus, SidebarStatePayload } from "@/lib/types"; import type { SidebarStatePayload } from "@/lib/types";
import { ClientProvider } from "@/providers/ClientProvider"; import { ClientProvider } from "@/providers/ClientProvider";
describe("useSidebarState", () => { describe("useSidebarState", () => {
@@ -20,7 +20,7 @@ describe("useSidebarState", () => {
.mockImplementation(async (state: SidebarStatePayload) => state); .mockImplementation(async (state: SidebarStatePayload) => state);
const client = { const client = {
status: "open" as const, status: "open" as const,
onStatus: (_handler: (status: ConnectionStatus) => void) => () => {}, onStatus: () => () => {},
onSidebarStateUpdate: (handler: (state: SidebarStatePayload) => void) => { onSidebarStateUpdate: (handler: (state: SidebarStatePayload) => void) => {
sidebarStateUpdateHandler = handler; sidebarStateUpdateHandler = handler;
return () => { return () => {