jhipster-vuejs
jhipster-vuejs copied to clipboard
Sonar analyze: component, update, details not covered
Overview of the issue
When launching Sonar Analyze, under Sonar, these files are not covered:
- component.ts
- update.component.ts
- details.component.ts
When we use npm test
, it seems to be covered
I'll update the template later if needed
Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)
JHipster configuration
Entity configuration(s) entityName.json
files generated in the .jhipster
directory
Browsers and Operating System
- [ ] Checking this box is mandatory (this is just to show you read everything)
I'm adding a bounty on this, as it is really important for us, in our current project with @nonomoho So if someone can help
You mean the update and details components for entities, right? For me it looks like they are also not covered when doing npm test, although there is unit test for that.
yes exactly @atomfrede it's for entities
but I remember I saw the same thing yesterday for health too:
- health.service.ts is covered
- health.component.ts not Both got spec.ts
Yes. .component.ts
are nowhere to find in the coverage reports also there is a spec for that which is executed. Very strange indeed.
You can find their coverage under corresponding .vue
files like user-management-edit.vue
contains the coverage of JhiUserManagementEdit
.
I think it's related to https://github.com/SonarSource/SonarTS/issues/477
Oh thanks @vishal423 We can see @sahbi-ktifa already answered to the ticket lol
In a project I'm working on we use only .vue
files without distinct .component.ts
files. And our sonar analysis has the correct coverage information.
Could we consider to use only .vue
files to fix this issue ?
Using only .vue
file for fixing this Sonar Analyze is not a good idea.
We split into TS file, to be consistent with Angular part, and it will probably help to migrate to Vue 3.
There is already an opened ticket for that: https://jira.sonarsource.com/browse/MMF-1441 So the real issue is on their side.
Using only
.vue
file for fixing this Sonar Analyze is not a good idea. We split into TS file, to be consistent with Angular part, and it will probably help to migrate to Vue 3.There is already an opened ticket for that: https://jira.sonarsource.com/browse/MMF-1441 So the real issue is on their side.
@pascalgrimaud it seems that it is not a priority for them :(