BR-Visualization / brcharts

Create BR charts
https://br-visualization.github.io/brcharts/
MIT License
0 stars 0 forks source link

22 create tests for pyramid chart #31

Closed Lovemore-Gakava closed 3 months ago

Lovemore-Gakava commented 3 months ago

Added test suite to include the following tests:

  1. Test that pyramid_chart returns a ggplot object: This test checks if the pyramid_chart function returns a ggplot object when provided with valid input data.
  2. Test that pyramid_chart handles missing data correctly: This test checks if the pyramid_chart function can handle missing data in the input data frame without causing errors.
  3. Test that pyramid_chart handles different input types correctly: This test checks if the pyramid_chart function can handle different input types (numeric and character) for the levelvar argument without causing errors.

I've updated the pyramid_chart function inline with the tests.

github-actions[bot] commented 3 months ago

badge

Code Coverage Summary

Filename                Stmts    Miss  Cover    Missing
--------------------  -------  ------  -------  ---------
R/grouped_barchart.R       12      12  0.00%    23-35
R/pyramid_chart.R          76       1  98.68%   52
R/utils.R                 284      91  67.96%   368-609
TOTAL                     372     104  72.04%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  -------
R/pyramid_chart.R       +6     -69  +98.68%
R/utils.R                0    -193  +67.96%
TOTAL                   +6    -262  +72.04%

Results for commit: 7d5d085fcd6e8d6bf6d8e74633dfe45e19c0ba0c

Minimum allowed coverage is 80%

:recycle: This comment has been updated with latest results

github-actions[bot] commented 3 months ago

Unit Tests Summary

 1 files   1 suites   1s :stopwatch:  3 tests  3 :white_check_mark: 0 :zzz: 0 :x: 52 runs  52 :white_check_mark: 0 :zzz: 0 :x:

Results for commit 7d5d085f.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 3 months ago

Github pages

Review the pkgdown webpage for the PR here

Lovemore-Gakava commented 3 months ago

@chen-chen-stat this PR is ready for your review - thanks.