import { expect, test } from "bun:test" import { makeCheckPathTool } from "../utils/pathTools" test("makeCheckPathTool exactCheck", () => { const tool = makeCheckPathTool("https://example.com/base") expect(tool.exactCheck("/base")).toBe(true) expect(tool.exactCheck("/base/extra")).toBe(false) }) test("makeCheckPathTool startsWithCheck", () => { const tool = makeCheckPathTool("https://example.com/base") expect(tool.startsWithCheck("/base")).toBe(true) expect(tool.startsWithCheck("/base/extra")).toBe(false) expect(tool.startsWithCheck("/other")).toBe(false) }) test("makeCheckPathTool fullCheck", () => { const tool = makeCheckPathTool("https://example.com/") expect(tool.fullCheck("/")).toBe(true) expect(tool.fullCheck("/base")).toBe(false) }) test("makeCheckPathTool with prefix", () => { const tool = makeCheckPathTool("https://example.com/prefix/base", "/prefix") expect(tool.exactCheck("/base")).toBe(true) expect(tool.startsWithCheck("/base")).toBe(true) expect(tool.fullCheck("/prefix")).toBe(false) })