mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
chore: section-prefix remaining tool paths in docs, examples, benchmarks, and multi-input test
This commit is contained in:
@@ -73,6 +73,15 @@ describe("rewriteToolPaths", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("treats ) and , as segment boundaries (prose/comments)", () => {
|
||||
expect(rewriteToolPaths("see (/api/v1/tools/crop) for details", MAP)).toBe(
|
||||
"see (/api/v1/tools/image/crop) for details",
|
||||
);
|
||||
expect(rewriteToolPaths("endpoints /api/v1/tools/crop, /api/v1/tools/resize", MAP)).toBe(
|
||||
"endpoints /api/v1/tools/image/crop, /api/v1/tools/image/resize",
|
||||
);
|
||||
});
|
||||
|
||||
it("throws if an id is also a section slug (idempotency invariant)", () => {
|
||||
expect(() => rewriteToolPaths("x", { image: "image" })).toThrow(/idempotency/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user