@@ -7,8 +7,7 @@ import type { CliRunOptions, Config } from '../../types';
77import * as run from '../../cli/run' ;
88import * as xcrun from '../../utils/xcrun' ;
99import * as adb from '../../utils/adb' ;
10- import * as execa from 'execa' ;
11- import { execaCommand } from 'execa' ;
10+ import execa from 'execa' ;
1211import { Logger } from '../../logger' ;
1312
1413jest . mock ( '../utils/xcrun' ) ;
@@ -22,9 +21,9 @@ describe('run.ts', () => {
2221 const mkdirMock = jest . spyOn ( fs , 'mkdir' ) ;
2322 const execKillMock = {
2423 kill : jest . fn ( ) ,
25- } as unknown as ReturnType < typeof execaCommand > ;
24+ } as unknown as execa . ExecaChildProcess < any > ;
2625
27- const execMock = jest . spyOn ( execa , 'execaCommand ' ) . mockReturnValue ( execKillMock ) ;
26+ const execMock = jest . spyOn ( execa , 'command ' ) . mockImplementation ( ) ;
2827
2928 beforeEach ( ( ) => {
3029 mkdirMock . mockReset ( ) ;
@@ -154,7 +153,7 @@ describe('run.ts', () => {
154153 process . cwd ( )
155154 ) } --runInBand`;
156155
157- const commandSyncMock = jest . spyOn ( execa , 'execaCommandSync ' ) ;
156+ const commandSyncMock = jest . spyOn ( execa , 'commandSync ' ) ;
158157 const mockGenerateReport = jest . spyOn ( reportHelpers , 'generateReport' ) ;
159158
160159 jest . spyOn ( Logger . prototype , 'print' ) . mockImplementation ( ) ;
0 commit comments