Build a fake `Stats` for the in-memory stat adapter.
(kind: "file" | "directory")
| 25 | |
| 26 | /** Build a fake `Stats` for the in-memory stat adapter. */ |
| 27 | function fakeStats(kind: "file" | "directory"): Stats { |
| 28 | return { |
| 29 | isFile: () => kind === "file", |
| 30 | isDirectory: () => kind === "directory", |
| 31 | } as Stats; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Build a stat adapter from a path → kind map. Throws ENOENT for any |