@@ -39,14 +39,7 @@ export const builtinPools: BuiltinPool[] = [
3939 'typescript' ,
4040]
4141
42- function getDefaultPoolName ( project : WorkspaceProject , file : string ) : Pool {
43- if ( project . config . typecheck . enabled ) {
44- for ( const glob of project . config . typecheck . include ) {
45- if ( mm . isMatch ( file , glob , { cwd : project . config . root } ) ) {
46- return 'typescript'
47- }
48- }
49- }
42+ function getDefaultPoolName ( project : WorkspaceProject ) : Pool {
5043 if ( project . config . browser . enabled ) {
5144 return 'browser'
5245 }
@@ -64,7 +57,7 @@ export function getFilePoolName(project: WorkspaceProject, file: string) {
6457 return pool as Pool
6558 }
6659 }
67- return getDefaultPoolName ( project , file )
60+ return getDefaultPoolName ( project )
6861}
6962
7063export function createPool ( ctx : Vitest ) : ProcessPool {
@@ -174,9 +167,19 @@ export function createPool(ctx: Vitest): ProcessPool {
174167 }
175168
176169 for ( const spec of files ) {
177- const pool = getFilePoolName ( spec [ 0 ] , spec [ 1 ] )
170+ const [ project , file ] = spec
171+ const pool = getFilePoolName ( project , file )
178172 filesByPool [ pool ] ??= [ ]
179173 filesByPool [ pool ] . push ( spec )
174+
175+ if ( project . config . typecheck . enabled ) {
176+ for ( const glob of project . config . typecheck . include ) {
177+ if ( mm . isMatch ( file , glob , { cwd : project . config . root } ) ) {
178+ filesByPool . typescript ??= [ ]
179+ filesByPool . typescript . push ( spec )
180+ }
181+ }
182+ }
180183 }
181184
182185 const Sequencer = ctx . config . sequence . sequencer
0 commit comments