|
As of today, there are a total of 18 UI/Stripes modules that include some kind of Jest unit tests. Of these 18, 11 are configured to generate their coverage report in the directory './artifacts/coverage'. The remaining 7 are configured to generate their coverage report in the directory './artifacts/coverage-jest'. The coverage report directory is defined by the 'coverageDirectory' parameter in the 'jest.config.js' file located in the root directory of the repos that contain Jest unit tests. The problem with defining the coverage report directory as './artifacts/coverage' is that BigTest outputs its coverage report to the same location. So if repos contain both Jest and some other unit test framework, we cannot guarantee that the coverage report imported into Sonarqube will be from Jest. The 11 repos that currently have their Jest coverage directory set to './artifacts/coverage' are:
ui-circulation-log
ui-plugin-bursar-export
stripes-util
ui-quick-marc
ui-remote-storage
ui-eholdings
ui-notes
ui-data-import
ui-plugin-find-organization
ui-plugin-find-package-title
ui-myprofile
I recommend that Jest unit tests generate their coverage report to a standard, Jest-only location. './artifacts/coverage-jest' and configure the CI pipeline to have Sonarqube only analyze the coverage report in that location. The 11 repos listed above will need to be updated with the new location.
|