Improve test coverage by adding comprehensive tests for utility functions and helpers #576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR significantly improves the test coverage of the
reportpackage by adding comprehensive tests for utility functions and helper methods that were previously undertested.Coverage Improvements
The test suite has been expanded from 534 to 626 tests (92 new tests added), targeting specific files that had low coverage:
Enhanced Files
utils_grouped_df.R(was 13.56% coverage).group_indices(),.groups_drop(), and.calculate_groups()format_model.R(was 46.15% coverage)format_model.character()method with all supported model typesget_model_type_prefix()report_table.R(was 54.24% coverage)as.report_table()methods with summary and as_is parametersc.report_table().report_table_footer()and.report_table_caption()helper functionsreport_effectsize.R(was 68.97% coverage)test-report_effectsize_helpers.Rfor helper functions.text_effectsize()with all interpretation methods (Cohen, Gignac, Funder, etc.).text_standardize()covering all standardization methods (refit, 2sd, smart, basic, posthoc)as.report_effectsize()and print methodsreport_s.R(was 93.33% coverage)Implementation Details
All tests follow existing repository conventions and focus on:
The changes include appropriate version bumping (0.6.1.6 → 0.6.1.7) and NEWS.md documentation.
Testing
All 626 tests pass successfully with no regressions. The improvements provide robust validation of utility functions while maintaining full backward compatibility.
Fixes #559.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.