-
-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown% Coverage When updating past nyc@12.0.2
#1086
Comments
It appears this is related to changes in our include/exclude processing. If you alter your {
"include": ["src/**/*.js", "dist/**/*.js"],
"exclude": ["src/**/*.spec.js", "dist/**/*.test.js"],
"reporter": ["lcov", "text-summary"],
"sourceMap": true,
"instrument": true,
"cache": true,
"all": false
} I tested this against nyc@14.1.0 (currently a prerelease but includes some fixes to source-maps that I recommend since you're using |
Thanks @coreyfarrell - It looks like it was just something as small as that. Would it be possible to update the |
Some issue with nyc@14. See istanbuljs/nyc#1086
Some issue with nyc@14. See istanbuljs/nyc#1086
Anyone seeing this error in the future and using Typescript, our {
"reporter": ["lcov", "cobertura", "text", "text-summary"],
"include": ["**/*.ts"],
"exclude": ["serverless.ts", "**/index.ts", "**/*.schema.ts", "config/**/*.ts", "**/*.test.ts"],
"check-coverage": true,
"sourceMap": true,
"instrument": true,
"cache": true,
"all": false,
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
} |
Link to bug demonstration repository
https://github.com/mschnee/nyc-unknown-example
Unknown% coverage when updating past
nyc@12.0.2
Hey nyc team! To say that I love and depend on what you've done here would be an understatement.
We have run into a situation when upgrading from
nyc@12.0.2
to latestnyc@14.0.0
or even13.x
. Post-upgrade, nyc is no longer collecting coverage and is reportingUnknown%
.I have a degree of confidence that this situation is likely related to some kind of configuration, but having tried all reasonable permutations now (including adding all source files as well), the original project has opted to downgrade and lock
nyc
to version12.0.2
- because it works, and it is showing us the coverage we want to see. Google/StackOverflow haven't helped, and most published recipe guides are either out of date (published before the release of12.0.0
) or simply don't work. See #921 #946I have pushed an example repository which can be cloned and examined. The pertinent facts:
./src
. Compiled files are in./dist
docker-compose.yml
file. Specifically, to ensure that changes to backend services (including three different kinds of data stores) do not violate a established api contracts.nyc
is currently configured to instrument the pre-compiled files in./dist
and expected to generate coverage reporting using the source maps provided.Expected Behavior
Coverage is collected.
Coverage summary should be
Observed Behavior
No coverage is collected.
Coverage Summary shows
Environment Information
Relevant configuration files
ava.config.js
.nycrc.json
tsconfig.json
package.json
Instructions
The text was updated successfully, but these errors were encountered: