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 {
30
30
}
31
31
}
32
32
33
+ type TestRunner = ( runTestOptions : RunTestOptions ) => TestResult ;
34
+
33
35
export default function createRunner <
34
36
ExtraOptions extends Record < string , unknown > ,
35
37
> (
@@ -87,9 +89,7 @@ export default function createRunner<
87
89
onFailure : OnTestFailure ,
88
90
options : TestRunnerOptions ,
89
91
) : Promise < void > {
90
- const runner : ( runTestOptions : RunTestOptions ) => TestResult = (
91
- await import ( runPath )
92
- ) . default ;
92
+ const runner : TestRunner = ( await import ( runPath ) ) . default ;
93
93
94
94
const mutex = pLimit ( 1 ) ;
95
95
return tests . reduce (
@@ -136,9 +136,7 @@ export default function createRunner<
136
136
exposedMethods : [ 'default' ] ,
137
137
numWorkers : this . #globalConfig. maxWorkers ,
138
138
forkOptions : { stdio : 'inherit' } ,
139
- } ) as JestWorkerFarm < {
140
- default : ( runTestOptions : RunTestOptions ) => TestResult ;
141
- } > ;
139
+ } ) as JestWorkerFarm < { default : TestRunner } > ;
142
140
143
141
const mutex = pLimit ( this . #globalConfig. maxWorkers ) ;
144
142
You can’t perform that action at this time.
0 commit comments