(target: string, path: string, type: "dir" | "file")
| 21 | // Mirror the repo convention (preview.test.ts): non-symlink-privileged Windows |
| 22 | // runners can't create symlinks — skip those cases rather than crash the suite. |
| 23 | function tryCreateSymlink(target: string, path: string, type: "dir" | "file"): boolean { |
| 24 | try { |
| 25 | symlinkSync(target, path, type); |
| 26 | return true; |
| 27 | } catch { |
| 28 | return false; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | it("allows the base directory itself", () => { |
| 33 | const base = tmpDir("safepath-base-"); |