File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
packages/react-docgen-cli/tests/integration/utils Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change 11import { rm , stat } from 'fs/promises' ;
22import { dirname , join } from 'path' ;
3- import type { ExecaError , ExecaReturnValue } from 'execa' ;
43import { execaNode } from 'execa' ;
54import copy from 'cpy' ;
65import { temporaryDirectory } from 'tempy' ;
@@ -15,23 +14,19 @@ export default async function withFixture(
1514 fixture : string ,
1615 callback : ( api : {
1716 dir : string ;
18- run : (
19- args : readonly string [ ] ,
20- ) => Promise < { stdout : string ; stderr : string ; exitCode : number } > ;
17+ run : ( args : readonly string [ ] ) => Promise < {
18+ stdout : string ;
19+ stderr : string ;
20+ exitCode ?: number ;
21+ } > ;
2122 } ) => Promise < void > ,
2223) : Promise < void > {
2324 const tempDir = temporaryDirectory ( ) ;
2425
25- async function run (
26- args : readonly string [ ] ,
27- ) : Promise < ExecaError | ExecaReturnValue < string > > {
28- try {
29- return await execaNode ( cliBinary , args , {
30- cwd : tempDir ,
31- } ) ;
32- } catch ( error ) {
33- return error as ExecaError ;
34- }
26+ async function run ( args : readonly string [ ] ) {
27+ return await execaNode ( cliBinary , args , {
28+ cwd : tempDir ,
29+ } ) ;
3530 }
3631
3732 await stat ( join ( fixtureDir , fixture ) ) ;
You can’t perform that action at this time.
0 commit comments