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
includeAllSources does not work as expected #166
Comments
I confirm this problem still exists. |
Yep 👍 EDIT: using |
There appears to be a bug in preprocessor.js line 126 (https://github.com/karma-runner/karma-coverage/blob/master/lib/preprocessor.js#L126), in that I think this may solve the missing files from |
I have found that the |
facing the same issue. any help ? also trying to use karma-coverage-allsources https://www.npmjs.com/package/karma-coverage-allsources does not help. Apparently I get an error "could not load coverage-allsources it is not registered, Perhaps are you missing some plugin". |
Hi there. For anyone still interested in this topic, Here is a tool, which helps to add untested files to coverage report. It works fine with both JavaScript and TypeScript files. https://github.com/kopach/karma-sabarivka-reporter |
From the documentation:
"You can opt to include all sources files, as indicated by the coverage preprocessor, in your code coverage data, even if there are no tests covering them."
https://github.com/karma-runner/karma-coverage/blob/master/docs/configuration.md#includeallsources
However, with the following karma.conf.js
https://gist.github.com/schalkneethling/ccb6d61ef84e5a2e0107
When I run my
grunt test
target, the coverage report only shows the JS for which tests exist and nothing else. This leads me to believe that theincludeAllSources
flag does not work as advertised.I have read the issue here #11 logged almost two years ago, and the resulting PR, #76
Both are still open however, and I am wondering whether the addition of includeAllSources superseded the above? In either case, having full test coverage for all JS, even is there are no tests for it, is what I believe most (perhaps even all) people would want and need.
It would be great if this issue could be resolved soon. Thank you.
The text was updated successfully, but these errors were encountered: