Skip to content

Commit

Permalink
fix(vitest): don't run typecheck tests in browser if both are enabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va authored Jan 30, 2024
1 parent 0417ba2 commit 1045b98
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/vitest/src/node/pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ export function createPool(ctx: Vitest): ProcessPool {
}

function getDefaultPoolName(project: WorkspaceProject, file: string): Pool {
if (project.config.browser.enabled)
return 'browser'

if (project.config.typecheck.enabled) {
for (const glob of project.config.typecheck.include) {
if (mm.isMatch(file, glob, { cwd: project.config.root }))
return 'typescript'
}
}

if (project.config.browser.enabled)
return 'browser'
return project.config.pool
}

Expand Down

0 comments on commit 1045b98

Please # to comment.