(inlineArgs: Array<string>)
| 41 | }) |
| 42 | |
| 43 | async function init(inlineArgs: Array<string>): ReturnType<typeof fsMock.exec> { |
| 44 | const result = await fsMock.exec( |
| 45 | `node ${CLI_PATH} init ${inlineArgs.join(' ')}`, |
| 46 | ) |
| 47 | |
| 48 | return { |
| 49 | ...result, |
| 50 | // Strip stdout from color unicode characters: |
| 51 | stdout: result.stdout.replace(/\x1b\[\d+m/gi, ''), |
| 52 | stderr: result.stderr.replace(/\x1b\[\d+m/gi, ''), |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | test('copies the script to a given path without saving', async () => { |
| 57 | await fsMock.create({ |
no outgoing calls
no test coverage detected
searching dependent graphs…