UNPKG

node-liblzma

Version:
53 lines (45 loc) 1.71 kB
import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { // Include TypeScript and JavaScript test files, but exclude utils files include: ['test/**/*.{ts,js,tsx,jsx}'], exclude: ['test/**/*.utils.{ts,js}'], // Increased timeout to prevent premature termination testTimeout: 10000, hookTimeout: 10000, // Retry failed tests once to handle intermittent race conditions retry: 1, // Use forks universally to avoid IPC channel issues (Vitest #8201) // This resolves "Channel closed" errors on GitHub Actions pool: 'forks', poolOptions: { forks: { singleFork: true, // Run tests sequentially in single fork isolate: true, // Isolate test environment maxThreads: 1, // Explicit thread control for shutdown stability minThreads: 1, }, }, // Coverage configuration - V8 optimisé pour précision max coverage: { provider: 'v8', reporter: ['text', 'json', 'html', 'lcov'], include: ['src/**/*.{ts,js}'], exclude: ['test/**/*', 'node_modules/**/*', '**/*.d.ts', 'lib/**/*.js'], // Configurations V8 pour précision maximale cleanOnRerun: true, all: false, // N'inclut que les fichiers qui sont réellement chargés skipFull: true, // Plus rapide et plus précis // Nouvelle option Vitest 3.2+ pour améliorer la précision experimentalAstAwareRemapping: true, ignoreEmptyLines: true, // Pas de thresholds pour l'instant - focus sur la précision }, // Allow tests to run in Node environment environment: 'node', // TypeScript support typecheck: { enabled: true, }, }, });