fix(cypress): do not override coverage exclude#304
Conversation
|
I've noticed it's not even loading the |
|
I'm pretty sure it used to work fine, but we recently bumped Could that be the cause? I checked their changelog and couldn't see hints to breaking changes, but an undocumented one could be the source of the problem Any idea on how we could automate testing that code-coverage is working correctly? |
|
I've found the problem, it's about const nycConfig = loadNycConfig({
cwd,
nycrcPath,
});
// Only instrument when we want to, as we only want instrumentation in test
// By default the plugin is always on
return new TestExclude({
cwd,
include: include ?? nycConfig.include,
exclude: exclude ?? nycConfig.exclude,
extension: extension ?? nycConfig.extension ?? DEFAULT_EXTENSION,
Reading from Will open an issue/PR in their repository. It will need another major release on their side because the plugin initialization will need to be async, e.g. |
Since we don't have any automation yet, that sounds fine to me. In an automated way, we could run the tests and upload coverage artifacts to GitHub actions. Then, every time we run the tests, we can download the previous artifacts and compare them with the newly generated coverage results. In a matrix, we can run these procedures for |
|
Also, it's not possible to override |
|
Seems like istanbul maintainer isn't maintaining it that much Here's a workaround to allow overriding properties defined by an extended configuration |
|
We can probably pin That package not picking up |
|
Logically, "no |
|
I've created the PR: iFaxity/vite-plugin-istanbul#53 |
|
We need to wait until iFaxity/vite-plugin-istanbul#53 and then bump the version. After that, we should be able to merge this. |
|
@yusufkandemir the new version with your fix has been released, can you bump the dependency and try out if everything is now working correctly? I'll then merge and release a new version, possibly the last one before v5 stable version |
Contains a fix for nycrc loading mechanism
|
@IlCallo it's ready |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
devbranch and not themasterbranchOther information:
When specifying the
excludeoption invite-plugin-istanbul, it uses that instead of the ones in.nycrc. The ones specified inexcludeoption isn't accurate either. So, this PR updates theexcludein.nycrcto cover everything, then removes thevite-plugin-istanbul'sexcludeoption. Now, the excludes are more accurate, and the users will be able to add more excludes in their.nycrcfiles as they wish.