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