mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-08-13 15:49:16 +03:00
test(webui): fix sidebar state lint
This commit is contained in:
@@ -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 () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user