Update unit testing guide with code coverage#146
Update unit testing guide with code coverage#146dijidiji wants to merge 10 commits intothoth-tech:mainfrom
Conversation
✅ Deploy Preview for strong-fairy-c1bde1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for thoth-tech ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
rory-cd
left a comment
There was a problem hiding this comment.
General
Type of Change:
- Documentation (new)
Content Quality:
- Content is accurate and clear
- Markdown formatting is consistent
- Components used appropriately
- Images render properly
Testing
- Have run
npm run format - Have run
npm run build - Have run
npm run devand/ornpm run preview, using:- Chrome
- Safari
- Firefox
- Deploy preview verified
The test coverage instructions were followed in a Windows/WSL environment, using both the command line and the VSCode extension. Following the documentation produced the expected output as described.
Suggested Improvements
Optional improvements are commented inline below. As mentioned in thoth-tech/splashkit-core#116, the documentation may benefit from mentioning expected output differences when using VSCode compared to command line.
| @@ -0,0 +1,135 @@ | |||
| --- | |||
| title: Code Coverage | |||
There was a problem hiding this comment.
Consider adding a description here
|
|
||
| Code coverage provides a convenient way to see what parts of SplashKit are being tested. This is | ||
| helpful for checking that existing tests are adequate, as well as for locating parts of the code | ||
| would be good candidates for new tests. Consider generating a code coverage report after adding a |
There was a problem hiding this comment.
...as well as for locating parts of the code would be good candidates for new tests.
Should be "...as well as for locating parts of the code that would be good candidates for new tests."
| Install lcov via your package manager e.g., `apt install lcov` (note that your Linux | ||
| distribution may use a different package manager rather than `apt`, and you may need to `sudo` | ||
| this command) |
There was a problem hiding this comment.
This is a good place to implement a :::note callout for better readability.
This section would also benefit from a short description of code coverage tools and/or links to documentation.
| Note that currently code coverage reports won't display properly with versions of the CMake Tools | ||
| extension 1.21.36 and beyond. To work around this, you can install an older version of the extension | ||
| by clicking the arrow next to Install/Uninstall (depending on if you have CMake Tools installed | ||
| already) and selecting "Install Specific Version...". The latest version known to work is 1.20.53. |
There was a problem hiding this comment.
This could be in a :::note or :::warning callout for better readability.
Description
Added instructions on generating code coverage to the guide, corresponding to thoth-tech/splashkit-core#116
Type of change
How Has This Been Tested?
Testing Checklist
npm run formatnpm run buildnpm run devand/ornpm run preview, using:Checklist