Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

595 B
Raw Blame
import { describe, expect, test } from "vitest";

import { getAssistantIconSearchQuery } from "./assistant-tool-label";

describe("getAssistantIconSearchQuery", () => {
  test("extracts and trims the streamed icon search target", () => {
    expect(getAssistantIconSearchQuery("icon_findIcons", { searchText: "  homarr  " })).toBe("homarr");
  });

  test("distinguishes browsing all icons from unrelated tools", () => {
    expect(getAssistantIconSearchQuery("icon_findIcons", {})).toBe("");
    expect(getAssistantIconSearchQuery("app_create", { searchText: "homarr" })).toBeNull();
  });
});