Handle missing selected workspace files

This commit is contained in:
Federico Jaramillo Martinez
2026-05-11 10:41:33 +02:00
parent 1ae43998e7
commit 045f4e247a
4 changed files with 24 additions and 2 deletions
@@ -58,6 +58,7 @@ describe("listWorkspaceTree", () => {
await writeFile(join(root, "file.txt"), "content");
await expect(listWorkspaceTree(root, "file.txt")).rejects.toThrow("Path is not a directory");
await expect(listWorkspaceTree(root, "missing-dir")).rejects.toThrow("Path does not exist");
await expect(listWorkspaceTree(root, "../outside")).rejects.toThrow("Path traversal is not allowed");
await expect(listWorkspaceTree(root, "/tmp")).rejects.toThrow("Absolute paths are not allowed");
});