A temp folder holding `files`; the project is its `app/` folder.
(files: Files)
| 31 | |
| 32 | /** A temp folder holding `files`; the project is its `app/` folder. */ |
| 33 | function layout(files: Files): string { |
| 34 | const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-ws-outside-')); |
| 35 | roots.push(root); |
| 36 | for (const [file, text] of Object.entries(files)) { |
| 37 | fs.mkdirSync(path.dirname(path.join(root, file)), { recursive: true }); |
| 38 | fs.writeFileSync(path.join(root, file), text); |
| 39 | } |
| 40 | return path.join(root, 'app'); |
| 41 | } |
| 42 | |
| 43 | /** The issue's layout: an app importing `left-pad2`, a sibling folder (outside the app) named that. */ |
| 44 | function issueLayout(app: Record<string, unknown>, extra: Files = {}): string { |
no test coverage detected