(
result: Promise<{ stdout: string; stderr: string }>
)
| 11 | const noop = () => {}; |
| 12 | |
| 13 | function createMockExecResult( |
| 14 | result: Promise<{ stdout: string; stderr: string }> |
| 15 | ): ReturnType<typeof disposableExec.execFileAsync> { |
| 16 | void result.catch(noop); |
| 17 | return { |
| 18 | result, |
| 19 | get promise() { |
| 20 | return result; |
| 21 | }, |
| 22 | child: {}, |
| 23 | [Symbol.dispose]: noop, |
| 24 | } as unknown as ReturnType<typeof disposableExec.execFileAsync>; |
| 25 | } |
| 26 | |
| 27 | async function pathExists(targetPath: string): Promise<boolean> { |
| 28 | return fs.promises |
no outgoing calls
no test coverage detected