Skip to content
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

Fix coverage #25

Merged
merged 6 commits into from
Apr 12, 2023
Merged

Fix coverage #25

merged 6 commits into from
Apr 12, 2023

Conversation

albthali
Copy link
Contributor

@albthali albthali commented Apr 4, 2023

Allow nx-sonarqube plugin to detect coverageDirectory and properly add coverage files.

@nx-cloud
Copy link

nx-cloud bot commented Apr 4, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 65a315c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


🟥 Failed Commands
nx affected --target=e2e --parallel=1
✅ Successfully ran 4 targets

Sent with 💌 from NxCloud.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes

@@ -43,10 +43,12 @@ describe('nx-sonarqube e2e', () => {
it(
'should generate test coverage, configure nx-sonarqube target, & include static and implicit sources in the scan',
async () => {
// await runNxCommandAsync(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -47,7 +47,16 @@ async function determinePaths(
sources.push(dep.sourceRoot);

if (dep.testTarget) {
if (dep.testTarget.options.jestConfig) {
if (dep.testTarget.options.coverageDirectory) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unit test should cover this branching and be 100%. check the CI run for more details

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I covered it in the e2e test. I will add a unit test to check this case.

@koliveira15 koliveira15 merged commit 4607fb3 into koliveira15:main Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants