question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

includeAllSources does not work as expected

See original GitHub issue

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 the includeAllSources flag does not work as advertised.

I have read the issue here https://github.com/karma-runner/karma-coverage/issues/11 logged almost two years ago, and the resulting PR, https://github.com/karma-runner/karma-coverage/pull/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.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
kopachcommented, Feb 29, 2020

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 Karma has limitation in detecting all source files, in case we pass only 1 file as starting point to our tests. This tool overcomes this limitation.

0reactions
shaikhspear16commented, May 5, 2016

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”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Karma JS -- How to Include all All Sources? - Stack Overflow
I would like to include all the sources so that we can have a better idea of what it is not covered by...
Read more >
Utility-Frequently Asked Questions - IPUC
Heating sources may include electricity, gas, coal, wood, propane and oil. The organization issues payment directly to the natural gas and electric utilities....
Read more >
Guide to Using Maven when You Can't Use the Conventions
However, it is true that some Maven features or plugins (especially by third parties) may not work or work completely. This guide will...
Read more >
UMLS® Problems (Bugs) for Previous Versions
Problem : There is a known problem with MetamorphoSys that prevents it from validating files. Solution: NLM is working to resolve this error....
Read more >
Desk Research: How To Get Information For Next To Nothing
In the context of this chapter the term is widened to include all sources of information that do not involve a field survey...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found