File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,19 @@ import path from 'path'
3030export default defineConfig ( {
3131 test : {
3232 globals : true ,
33+ // Enable parallel test execution with threads (optimized for 10-core CPU)
34+ pool : 'threads' ,
35+ poolOptions : {
36+ threads : {
37+ // Use more threads for better parallelization on multi-core systems
38+ minThreads : 6 ,
39+ maxThreads : 10 ,
40+ // Isolate environment for each test file for better test isolation
41+ isolate : true
42+ }
43+ } ,
44+ // Increase max concurrency for better parallelization
45+ maxConcurrency : 8 ,
3346 watchTriggerPatterns : [
3447 {
3548 // matches any file inside the __testfixtures__ directory
@@ -51,7 +64,13 @@ export default defineConfig({
5164 include : [ '**/__tests__/**/*.test.tsx' ] ,
5265 environment : 'jsdom' ,
5366 setupFiles : './vitest.setup.ts' ,
54- name : { label : 'web' , color : 'blue' }
67+ name : { label : 'web' , color : 'blue' } ,
68+ // Optimize jsdom environment
69+ environmentOptions : {
70+ jsdom : {
71+ resources : 'usable'
72+ }
73+ }
5574 }
5675 } ,
5776 {
You can’t perform that action at this time.
0 commit comments