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 quality gate #4272

Merged
merged 5 commits into from
Oct 16, 2023
Merged

Fix quality gate #4272

merged 5 commits into from
Oct 16, 2023

Conversation

yassin-kammoun-sonarsource
Copy link
Contributor

No description provided.

jest.config.js Outdated
@@ -1,5 +1,5 @@
module.exports = {
collectCoverageFrom: ['packages/*/src/**/*.ts'],
collectCoverageFrom: ['packages/*/src/**/*.ts', 'packages/bridge/src/worker.js'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change doesn't entirely solve the coverage collecting of worker.js. Only coverage for exported functions (that are somehow imported somewhere) is accounted for but code executed through the invocation of new Worker('./worker.js') is not.

Jest currently doesn't support coverage collecting for code executed as part of spawned processes and threads (see here). According to the discussion, using nyc could be a workaround worth trying.

In the meantime, do you know if there is any way to tell SonarQube to ignore specific files from coverage?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I will use it then.

@@ -26,3 +26,19 @@ describe('debug', () => {
expect(console.log).toHaveBeenCalledWith(`DEBUG hello, world!`);
});
});

describe('warn', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks! ;-)

@sonarqube-next
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@yassin-kammoun-sonarsource yassin-kammoun-sonarsource merged commit 7789853 into master Oct 16, 2023
16 checks passed
@yassin-kammoun-sonarsource yassin-kammoun-sonarsource deleted the quality-gate branch October 16, 2023 08:57
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