MCPcopy Create free account
hub / github.com/chhoumann/quickadd / makeFile

Function makeFile

src/utils/fileSyntax.test.ts:216–223  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

214
215describe("buildFileDisplayLabels", () => {
216 const makeFile = (path: string) => {
217 const segment = path.split("/").pop() ?? path;
218 const basename = segment.replace(/\.md$/, "");
219 const parentPath = path.includes("/")
220 ? path.slice(0, path.lastIndexOf("/"))
221 : "/";
222 return { basename, parent: { path: parentPath } } as never;
223 };
224
225 it("uses bare basenames when unambiguous", () => {
226 const labels = buildFileDisplayLabels([

Callers 1

fileSyntax.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected