File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ class CancelRun extends Error {
3030 }
3131}
3232
33+ type TestRunner = ( runTestOptions : RunTestOptions ) => TestResult ;
34+
3335export default function createRunner <
3436 ExtraOptions extends Record < string , unknown > ,
3537> (
@@ -87,9 +89,7 @@ export default function createRunner<
8789 onFailure : OnTestFailure ,
8890 options : TestRunnerOptions ,
8991 ) : Promise < void > {
90- const runner : ( runTestOptions : RunTestOptions ) => TestResult = (
91- await import ( runPath )
92- ) . default ;
92+ const runner : TestRunner = ( await import ( runPath ) ) . default ;
9393
9494 const mutex = pLimit ( 1 ) ;
9595 return tests . reduce (
@@ -136,9 +136,7 @@ export default function createRunner<
136136 exposedMethods : [ 'default' ] ,
137137 numWorkers : this . #globalConfig. maxWorkers ,
138138 forkOptions : { stdio : 'inherit' } ,
139- } ) as JestWorkerFarm < {
140- default : ( runTestOptions : RunTestOptions ) => TestResult ;
141- } > ;
139+ } ) as JestWorkerFarm < { default : TestRunner } > ;
142140
143141 const mutex = pLimit ( this . #globalConfig. maxWorkers ) ;
144142
You can’t perform that action at this time.
0 commit comments