chore: set test parallelism

This commit is contained in:
2026-02-10 16:21:47 +01:00
parent 008346a93f
commit 192969e75a

View File

@@ -1,10 +1,17 @@
import { defineConfig } from 'vitest/config'; import { defineConfig } from 'vitest/config';
import path from 'path'; import path from 'path';
import os from 'os';
import react from '@vitejs/plugin-react'; import react from '@vitejs/plugin-react';
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
test: { test: {
pool: 'forks',
poolOptions: {
forks: {
maxForks: Math.max(1, Math.floor(os.cpus().length / 2)),
},
},
globals: true, globals: true,
// Use jsdom for React component tests, node for main process tests // Use jsdom for React component tests, node for main process tests
environment: 'jsdom', environment: 'jsdom',