(names: string[])
| 8 | import type { CloudConvertClient, Job } from '../src/types.js'; |
| 9 | |
| 10 | export async function createTempFiles(names: string[]): Promise<{ dir: string; files: string[]; cleanup: () => Promise<void> }> { |
| 11 | const dir = await mkdtemp(join(tmpdir(), 'cloudconvert-cli-')); |
| 12 | const files: string[] = []; |
| 13 | |
| 14 | for (const name of names) { |
| 15 | const file = join(dir, name); |
| 16 | await writeFile(file, 'fixture'); |
| 17 | files.push(file); |
| 18 | } |
| 19 | |
| 20 | return { |
| 21 | dir, |
| 22 | files, |
| 23 | cleanup: () => rm(dir, { recursive: true, force: true }) |
| 24 | }; |
| 25 | } |
| 26 | |
| 27 | export function createFakeJob(): Job { |
| 28 | return { |
no outgoing calls
no test coverage detected