From 1a77f625f788fd8c5855010e46bb6ce3ee04004c Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Fri, 3 Apr 2026 10:41:52 +0200 Subject: [PATCH] fix: coverage JS avec istanbul au lieu de v8 (incompatible Bun) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - vitest.config.js : provider changé de 'v8' à 'istanbul' car v8 utilise le Node Inspector API non supporté par Bun - package.json : ajout @vitest/coverage-istanbul comme devDependency - Résultat : 17 tests JS, 77% stmts, 63% branches, 75% funcs, 77% lines Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 1 + vitest.config.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index dec5ad8..1674a57 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@hotwired/stimulus": "^3.0.0", "@spomky-labs/pwa-bundle": "file:vendor/spomky-labs/pwa-bundle/assets", "@tailwindcss/postcss": "^4.1.18", + "@vitest/coverage-istanbul": "^4.1.2", "@vitest/coverage-v8": "^4.1.0", "eslint": "9", "idb": "^8.0.3", diff --git a/vitest.config.js b/vitest.config.js index 4f2adcc..770f863 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -5,7 +5,7 @@ export default defineConfig({ environment: 'happy-dom', include: ['tests/js/**/*.test.js'], coverage: { - provider: 'v8', + provider: 'istanbul', include: ['assets/**/*.js'], exclude: ['assets/modules/event-map.js', 'assets/modules/billet-designer.js', 'assets/modules/stripe-payment.js'], reporter: ['text', 'lcov'],