Invalid file coverage object, missing keys #7566
-
Hi, I'm trying to change test.provider from When using script: "test:coverage": "TEST=true vitest run --coverage" vitest.config.ts
I'm using "vitest": "3.0.5" and "@vitest/coverage-istanbul": "3.0.5", I have tried using 3.0.7 as well with the same issue. Anyone that has any ideas what could be the issue? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Could you try setting up minimal example using https://vitest.new that runs into this issue? The error is coming from https://github.com/istanbuljs/istanbuljs/blob/06eec782dc8a248f0516cdba06b280c410515890/packages/istanbul-lib-coverage/lib/file-coverage.js#L26-L43. |
Beta Was this translation helpful? Give feedback.
Hi, I tried doing the same setup on vitest.new to be able to reproduce the issue, but I couldn't. So I figured out it's probably a fault on my end. What I did to get it fixed was that I had to re-generate a new worker script (mockServiceWorker.js), after that the reports was successfully created with istanbul as provider.
Thanks for the quick response, appreciated.