(files: Record<string, string>, path: string)
| 15 | } |
| 16 | |
| 17 | function hasDirectory(files: Record<string, string>, path: string) { |
| 18 | const directory = normalizePath(path) |
| 19 | const prefix = directory.endsWith('/') ? directory : `${directory}/` |
| 20 | return Object.keys(files).some((file) => file.startsWith(prefix)) |
| 21 | } |
| 22 | |
| 23 | function createMissingDirectoryError(path: string) { |
| 24 | return new Error(`Directory not found: ${path}`) |
no test coverage detected