import { homedir } from "node:os"; import path from "node:path"; import { describe, expect, it } from "vitest"; import { assertProjectWorkspaceMountAllowed } from "./project-workspace-mount.js"; describe("assertProjectWorkspaceMountAllowed", () => { it("rejects the filesystem root and the user home directory", () => { expect(() => assertProjectWorkspaceMountAllowed(path.parse("/").root)).toThrow(/root/); expect(() => assertProjectWorkspaceMountAllowed(homedir())).toThrow(/home directory/); }); });