Commented out thresholds still appear in output
Closed this issue · 2 comments
I have this code block in my vitest.config
coverage: {
reporter: ["text", "json-summary", "json", "html"],
// lines: 75,
// branches: 75,
// functions: 75,
// statements: 75,
},
The parser is still picking up the commented out code coverage thresholds and applying them in the output
Hey @zainbhaila ,
this is due to the way I am parsing the threshold - it's on a text basis rather than actually interpreting the config itself. Do you have a reason to comment out the limits rather than just removing them (never been a friend of committed but outcommented code)?
Else I am happy to accept a PR that improves the parsing for this. 🙂
There is a warning in the coverage-threshold section of the readme now that explains this behavior.
I would love to integrate a more reliable way of parsing the config in this library, but I don't have the time to do this right now.
As there was no further feedback, I will also close this issue for now.