Skip to content

Enable code coverage tests, add thresholds#298

Merged
mofojed merged 4 commits intodeephaven:mainfrom
mofojed:code-coverage
Nov 22, 2021
Merged

Enable code coverage tests, add thresholds#298
mofojed merged 4 commits intodeephaven:mainfrom
mofojed:code-coverage

Conversation

@mofojed
Copy link
Member

@mofojed mofojed commented Nov 16, 2021

Started with a baseline threshold just below existing levels for the whole project.
However, since the coverage report only runs on existing changes, it will check your diff and fail if they fall below those levels.
Only using the 'text' type reporter as that will be output in our console or in CI log output and we can see the failures from there.

@mofojed mofojed added this to the November 2021 milestone Nov 16, 2021
@mofojed mofojed requested a review from mattrunyon November 16, 2021 20:42
@mofojed mofojed self-assigned this Nov 16, 2021
@mofojed mofojed changed the title Enable code coverage tests, add thresholds WIP Enable code coverage tests, add thresholds Nov 16, 2021
- We don't really need the fancy reporters because we don't have anything that will consume them at this time
- No need to output to coverageDir
@mofojed mofojed changed the title WIP Enable code coverage tests, add thresholds Enable code coverage tests, add thresholds Nov 16, 2021
@mofojed mofojed requested a review from vbabich November 17, 2021 18:45
@vbabich
Copy link
Collaborator

vbabich commented Nov 18, 2021

Running npm test locally shows an error:

Failed to collect coverage from .../web-client-ui/packages/code-studio/src/styleguide/Editors.stories.jsx
ERROR: babel-jest: Babel ignores packages/code-studio/src/styleguide/Editors.stories.jsx - make sure to include the file in Jest's transformIgnorePatterns as well.

@mofojed
Copy link
Member Author

mofojed commented Nov 19, 2021

@vbabich I'm not getting the same error as you - do you have another flag or enter another command afterwards? Running just npm test results in no tests running since there hasn't been any changes...

vbabich
vbabich previously approved these changes Nov 22, 2021
The HTML ones in particular are good for drilling down into which code blocks aren't getting hit.
@mofojed mofojed merged commit ad53748 into deephaven:main Nov 22, 2021
@mofojed mofojed deleted the code-coverage branch November 22, 2021 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants