File tree Expand file tree Collapse file tree 4 files changed +6
-13
lines changed Expand file tree Collapse file tree 4 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import type {
10
10
TestWatcher ,
11
11
} from 'jest-runner' ;
12
12
import { Worker , JestWorkerFarm } from 'jest-worker' ;
13
- import throat from 'throat ' ;
13
+ import pLimit from 'p-limit ' ;
14
14
import type { CreateRunnerOptions , RunTestOptions } from './types' ;
15
15
16
16
function determineSlowTestResult ( test : Test , result : TestResult ) : TestResult {
@@ -76,7 +76,7 @@ export default function createRunner<
76
76
onFailure : OnTestFailure ,
77
77
options : TestRunnerOptions ,
78
78
) : Promise < void > {
79
- const mutex = throat ( 1 ) ;
79
+ const mutex = pLimit ( 1 ) ;
80
80
return tests . reduce (
81
81
( promise , test ) =>
82
82
mutex ( ( ) =>
@@ -131,7 +131,7 @@ export default function createRunner<
131
131
default : ( runTestOptions : RunTestOptions ) => TestResult ;
132
132
} > ;
133
133
134
- const mutex = throat ( this . #globalConfig. maxWorkers ) ;
134
+ const mutex = pLimit ( this . #globalConfig. maxWorkers ) ;
135
135
136
136
const runTestInWorker = ( test : Test ) =>
137
137
mutex ( ( ) => {
Original file line number Diff line number Diff line change 40
40
"dependencies" : {
41
41
"chalk" : " ^4.1.0" ,
42
42
"jest-worker" : " ^29.0.0" ,
43
- "throat " : " ^6.0.1 "
43
+ "p-limit " : " ^3.1.0 "
44
44
},
45
45
"devDependencies" : {
46
46
"@babel/cli" : " ^7.0.0" ,
Original file line number Diff line number Diff line change 11
11
"isolatedModules" : true ,
12
12
"importsNotUsedAsValues" : " error" ,
13
13
14
- "esModuleInterop" : false ,
14
+ "esModuleInterop" : true ,
15
15
"skipLibCheck" : false ,
16
16
17
17
/* Additional Checks */
Original file line number Diff line number Diff line change @@ -2706,9 +2706,9 @@ __metadata:
2706
2706
jest : ^29.0.0
2707
2707
jest-runner : ^29.0.0
2708
2708
jest-worker : ^29.0.0
2709
+ p-limit : ^3.1.0
2709
2710
prettier : ^2.0.5
2710
2711
strip-ansi : ^6.0.0
2711
- throat : ^6.0.1
2712
2712
typescript : ^4.3.5
2713
2713
peerDependencies :
2714
2714
" @jest/test-result " : ^28.0.0 || ^29.0.0
@@ -5833,13 +5833,6 @@ __metadata:
5833
5833
languageName : node
5834
5834
linkType : hard
5835
5835
5836
- " throat@npm:^6.0.1 " :
5837
- version : 6.0.1
5838
- resolution : " throat@npm:6.0.1"
5839
- checksum : 782d4171ee4e3cf947483ed2ff1af3e17cc4354c693b9d339284f61f99fbc401d171e0b0d2db3295bb7d447630333e9319c174ebd7ef315c6fb791db9675369c
5840
- languageName : node
5841
- linkType : hard
5842
-
5843
5836
" tmpl@npm:1.0.5 " :
5844
5837
version : 1.0.5
5845
5838
resolution : " tmpl@npm:1.0.5"
You can’t perform that action at this time.
0 commit comments