-
Notifications
You must be signed in to change notification settings - Fork 181
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
Fix quality gate #4272
Conversation
jest.config.js
Outdated
@@ -1,5 +1,5 @@ | |||
module.exports = { | |||
collectCoverageFrom: ['packages/*/src/**/*.ts'], | |||
collectCoverageFrom: ['packages/*/src/**/*.ts', 'packages/bridge/src/worker.js'], |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is this https://docs.sonarsource.com/sonarqube/latest/project-administration/analysis-scope/#code-coverage-exclusion , should be possible
There was a problem hiding this comment.
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', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! ;-)
SonarQube Quality Gate |
No description provided.