(program, options = {})
| 31 | |
| 32 | describe('program.Program', () => { |
| 33 | function execProgram(program, options = {}) { |
| 34 | const fakeProcess = createFakeProcess(); |
| 35 | const absolutePackageDir = path.join( |
| 36 | moduleURLToDirname(import.meta.url), |
| 37 | '..', |
| 38 | '..', |
| 39 | ); |
| 40 | if (program.absolutePackageDir == null) { |
| 41 | program.absolutePackageDir = absolutePackageDir; |
| 42 | } |
| 43 | return program.execute({ |
| 44 | getVersion: async () => 'not-a-real-version', |
| 45 | checkForUpdates: spy(), |
| 46 | systemProcess: fakeProcess, |
| 47 | shouldExitProgram: false, |
| 48 | ...options, |
| 49 | }); |
| 50 | } |
| 51 | |
| 52 | it('executes a command callback', () => { |
| 53 | const thing = spy(() => Promise.resolve()); |
no test coverage detected
searching dependent graphs…