SonarCloud miscounting coverage

Template for a good new topic, formatted with Markdown:

  • ALM used: Github
  • CI system used: Actions
  • Scanner command used when applicable:
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.14 Alpine (64-bit)
INFO: Linux 5.13.0-1031-azure amd64
  • Languages of the repository: Typescript, Javascript
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  1. Why is it saying that some import statements and interface typings are not covered by tests? (for example import moment)
  2. The return statement for component is being tested such that the entire component is being rendered. With that being the case, why is SonarCloud complaining that some of the child components, are not covered by tests? This doesn’t seem to be an issue before

Hi,

Welcome to the community!

We just reflect what’s reported in your coverage reports, so this is going to be a question for the maintainers of your coverage engine. Unless… there’s a mismatch between what’s in your coverage reports and what we’re showing?

 
Ann