Files
t3code/apps/web/src/components/chat/threadFind.test.ts
T
12069eefd7 feat(web): find messages and plans in the current thread (#10439)
Co-authored-by: Yash Singh <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-08 08:24:50 -05:00

12 lines
444 B
TypeScript

import { describe, expect, it } from "vite-plus/test";
import { formatThreadFindCount, stepThreadFindIndex } from "./threadFind";
describe("thread find navigation", () => {
it("clamps, wraps, and formats positions", () => {
expect(stepThreadFindIndex(2, 3, 1)).toBe(0);
expect(stepThreadFindIndex(0, 3, -1)).toBe(2);
expect(formatThreadFindCount(4, 2)).toBe("2/2");
expect(formatThreadFindCount(0, 0)).toBe("0/0");
});
});