The issue's layout: an app importing `left-pad2`, a sibling folder (outside the app) named that.
(app: Record<string, unknown>, extra: Files = {})
| 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 { |
| 45 | return layout({ |
| 46 | 'app/package.json': JSON.stringify({ name: 'app', ...app, dependencies: { 'left-pad2': '^1.0.0' } }), |
| 47 | 'app/src/util.ts': 'export function pad(s: string) { return s; }\n', |
| 48 | 'app/src/main.ts': "import { pad } from 'left-pad2';\nexport function run() { return pad('x'); }\n", |
| 49 | 'sibling/package.json': JSON.stringify({ name: 'left-pad2', main: 'index.ts' }), |
| 50 | 'sibling/index.ts': 'export function pad(s: string) { return s; }\n', |
| 51 | ...extra, |
| 52 | }); |
| 53 | } |
| 54 | |
| 55 | async function calleesOfRun(project: string): Promise<string[]> { |
| 56 | const cg = CodeGraph.initSync(project); |
no test coverage detected