Description
Link to bug demonstration repository
We are trying to update to v15 in https://github.com/webhintio/hint, the PR is webhintio/hint#3513
And the relevant output of CI is here
Expected Behavior
webhint uses a monorepo approach where we have a common .nycrc
file in the root of the project. In that file we set the minimum threshold to 80 for branches.
Some packages might override the default configuration. packages/hint
is one of those where the package.json
has an nyc
property that sets "branches": 75
.
Unfortunately, it seems like with the newest nyc version, properties in the extends
file cannot be override.
Observed Behavior
I've tried:
- removing
80
from extends and having75
in the package: test pass (expected as the coverage is 75.66%) - removing
80
from extends and having80
in the package: test fail (expected) - changing
80
by90
in the extends. Test fail saying the minimum threshold of 90 is not meet
This does not happen with previous nyc versions.
The documentation says:
You can then add the specific configuration options you want that aren't in that particular shared config, e.g.
(emphasis is mine) which maybe believe this might be intentional, but seems like a huge step back (ie.: having to have to set the coverage in each project).
Troubleshooting steps
- still occurring when I put
cache: false
in my nyc config
Environment Information
System:
OS: Linux 4.19 Ubuntu 18.04.4 LTS (Bionic Beaver)
CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
Memory: 8.63 GB / 12.17 GB
Binaries:
Node: 12.16.0 - ~/.nvm/versions/node/v12.16.0/bin/node
Yarn: 1.21.1 - /usr/bin/yarn
npm: 6.13.4 - ~/.nvm/versions/node/v12.16.0/bin/npm