19 lines · 682 B · TypeScript
RawDownload
import { describe, expect, it } from "vite-plus/test"; import { agentBrowserCursorOpacity } from "./agentBrowserCursorLogic"; describe("agentBrowserCursorOpacity", () => {  it("keeps active movement fully visible", () => {    expect(agentBrowserCursorOpacity(true, "agent")).toBe(1);    expect(agentBrowserCursorOpacity(true, "human")).toBe(1);  });   it("settles to a visible idle state", () => {    expect(agentBrowserCursorOpacity(false, "none")).toBe(0.35);    expect(agentBrowserCursorOpacity(false, "agent")).toBe(0.35);  });   it("dims further while the human controls the page", () => {    expect(agentBrowserCursorOpacity(false, "human")).toBe(0.18);  });});